[llvm] [libc][bazel] Adds missing targets for bf16 smoke tests (PR #223343)
Sachin 🗲 via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 02:41:51 PDT 2026
https://github.com/s4chinjha created https://github.com/llvm/llvm-project/pull/223343
this pr adds the missing bazel targets for the existing bf16 smoke tests.
>From 726c895696b4709f8d35bc6f2bb9ad4c9e4e518c Mon Sep 17 00:00:00 2001
From: s4chinjha <170951715+s4chinjha at users.noreply.github.com>
Date: Mon, 14 Sep 2026 15:10:37 +0530
Subject: [PATCH] adds bf16 smoke test targets
---
.../libc/test/src/math/smoke/BUILD.bazel | 475 ++++++++++++++++++
1 file changed, 475 insertions(+)
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
index 1ea19f953e0ad..80ae4b3212ef3 100644
--- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
@@ -10,12 +10,26 @@ package(default_visibility = ["//visibility:public"])
licenses(["notice"])
+math_test(
+ name = "acosbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "acosf")
math_test(name = "acoshf")
math_test(name = "acosf16")
+math_test(
+ name = "asinbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "asinf")
math_test(name = "asinf16")
@@ -38,6 +52,13 @@ math_test(
math_test(name = "atan")
+math_test(
+ name = "atanbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "atanf")
math_test(name = "atanhf")
@@ -50,6 +71,15 @@ math_test(
],
)
+math_test(
+ name = "canonicalizebf16",
+ hdrs = ["CanonicalizeTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ "//libc:__support_integer_literals",
+ ],
+)
+
math_test(
name = "canonicalizef",
hdrs = ["CanonicalizeTest.h"],
@@ -82,6 +112,14 @@ math_test(
],
)
+math_test(
+ name = "iscanonicalbf16",
+ hdrs = ["IsCanonicalTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "iscanonicalf16",
hdrs = ["IsCanonicalTest.h"],
@@ -97,6 +135,13 @@ math_test(
math_test(name = "cbrt")
+math_test(
+ name = "cbrtbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "cbrtf")
math_test(name = "cbrtf16")
@@ -106,6 +151,14 @@ math_test(
hdrs = ["CeilTest.h"],
)
+math_test(
+ name = "ceilbf16",
+ hdrs = ["CeilTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "ceilf",
hdrs = ["CeilTest.h"],
@@ -137,6 +190,14 @@ math_test(
hdrs = ["CopySignTest.h"],
)
+math_test(
+ name = "copysignbf16",
+ hdrs = ["CopySignTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "copysignf",
hdrs = ["CopySignTest.h"],
@@ -303,6 +364,14 @@ math_test(
hdrs = ["SqrtTest.h"],
)
+math_test(
+ name = "sqrtbf16",
+ hdrs = ["SqrtTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "sqrtf",
hdrs = ["SqrtTest.h"],
@@ -392,6 +461,14 @@ math_test(
hdrs = ["FAbsTest.h"],
)
+math_test(
+ name = "fabsbf16",
+ hdrs = ["FAbsTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fabsf",
hdrs = ["FAbsTest.h"],
@@ -435,6 +512,14 @@ math_test(
hdrs = ["FDimTest.h"],
)
+math_test(
+ name = "fdimbf16",
+ hdrs = ["FDimTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fdimf",
hdrs = ["FDimTest.h"],
@@ -493,6 +578,14 @@ math_test(
hdrs = ["FloorTest.h"],
)
+math_test(
+ name = "floorbf16",
+ hdrs = ["FloorTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "floorf",
hdrs = ["FloorTest.h"],
@@ -521,6 +614,14 @@ math_test(
hdrs = ["FmaTest.h"],
)
+math_test(
+ name = "fmabf16",
+ hdrs = ["FmaTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaf",
hdrs = ["FmaTest.h"],
@@ -536,6 +637,14 @@ math_test(
hdrs = ["FMaxTest.h"],
)
+math_test(
+ name = "fmaxbf16",
+ hdrs = ["FMaxTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaxf",
hdrs = ["FMaxTest.h"],
@@ -564,6 +673,14 @@ math_test(
hdrs = ["FMaximumTest.h"],
)
+math_test(
+ name = "fmaximumbf16",
+ hdrs = ["FMaximumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaximumf",
hdrs = ["FMaximumTest.h"],
@@ -587,6 +704,14 @@ math_test(
hdrs = ["FMaximumMagTest.h"],
)
+math_test(
+ name = "fmaximum_magbf16",
+ hdrs = ["FMaximumMagTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaximum_magf",
hdrs = ["FMaximumMagTest.h"],
@@ -610,6 +735,14 @@ math_test(
hdrs = ["FMaximumMagNumTest.h"],
)
+math_test(
+ name = "fmaximum_mag_numbf16",
+ hdrs = ["FMaximumMagNumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaximum_mag_numf",
hdrs = ["FMaximumMagNumTest.h"],
@@ -633,6 +766,14 @@ math_test(
hdrs = ["FMaximumNumTest.h"],
)
+math_test(
+ name = "fmaximum_numbf16",
+ hdrs = ["FMaximumNumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fmaximum_numf",
hdrs = ["FMaximumNumTest.h"],
@@ -676,6 +817,14 @@ math_test(
hdrs = ["FMinTest.h"],
)
+math_test(
+ name = "fminbf16",
+ hdrs = ["FMinTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fminf",
hdrs = ["FMinTest.h"],
@@ -704,6 +853,14 @@ math_test(
hdrs = ["FMinimumTest.h"],
)
+math_test(
+ name = "fminimumbf16",
+ hdrs = ["FMinimumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fminimumf",
hdrs = ["FMinimumTest.h"],
@@ -727,6 +884,14 @@ math_test(
hdrs = ["FMinimumMagTest.h"],
)
+math_test(
+ name = "fminimum_magbf16",
+ hdrs = ["FMinimumMagTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fminimum_magf",
hdrs = ["FMinimumMagTest.h"],
@@ -755,6 +920,14 @@ math_test(
hdrs = ["FMinimumMagNumTest.h"],
)
+math_test(
+ name = "fminimum_mag_numbf16",
+ hdrs = ["FMinimumMagNumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fminimum_mag_numf",
hdrs = ["FMinimumMagNumTest.h"],
@@ -783,6 +956,14 @@ math_test(
hdrs = ["FMinimumNumTest.h"],
)
+math_test(
+ name = "fminimum_numbf16",
+ hdrs = ["FMinimumNumTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fminimum_numf",
hdrs = ["FMinimumNumTest.h"],
@@ -866,6 +1047,14 @@ math_test(
hdrs = ["FrexpTest.h"],
)
+math_test(
+ name = "frexpbf16",
+ hdrs = ["FrexpTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "frexpf",
hdrs = ["FrexpTest.h"],
@@ -891,6 +1080,14 @@ math_test(
hdrs = ["FromfpTest.h"],
)
+math_test(
+ name = "fromfpbf16",
+ hdrs = ["FromfpTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fromfpf",
hdrs = ["FromfpTest.h"],
@@ -916,6 +1113,14 @@ math_test(
hdrs = ["FromfpxTest.h"],
)
+math_test(
+ name = "fromfpxbf16",
+ hdrs = ["FromfpxTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "fromfpxf",
hdrs = ["FromfpxTest.h"],
@@ -956,6 +1161,14 @@ math_test(
hdrs = ["GetPayloadTest.h"],
)
+math_test(
+ name = "getpayloadbf16",
+ hdrs = ["GetPayloadTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "getpayloadf",
hdrs = ["GetPayloadTest.h"],
@@ -981,6 +1194,14 @@ math_test(
hdrs = ["HypotTest.h"],
)
+math_test(
+ name = "hypotbf16",
+ hdrs = ["HypotTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "hypotf",
hdrs = ["HypotTest.h"],
@@ -996,6 +1217,14 @@ math_test(
hdrs = ["ILogbTest.h"],
)
+math_test(
+ name = "ilogbbf16",
+ hdrs = ["ILogbTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "ilogbf",
hdrs = ["ILogbTest.h"],
@@ -1016,6 +1245,14 @@ math_test(
hdrs = ["LdExpTest.h"],
)
+math_test(
+ name = "ldexpbf16",
+ hdrs = ["LdExpTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "ldexpf",
hdrs = ["LdExpTest.h"],
@@ -1041,6 +1278,14 @@ math_test(
hdrs = ["ILogbTest.h"],
)
+math_test(
+ name = "llogbbf16",
+ hdrs = ["ILogbTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "llogbf",
hdrs = ["ILogbTest.h"],
@@ -1079,6 +1324,14 @@ math_test(
hdrs = ["RoundToIntegerTest.h"],
)
+math_test(
+ name = "llrintbf16",
+ hdrs = ["RoundToIntegerTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "llrintf",
hdrs = ["RoundToIntegerTest.h"],
@@ -1112,6 +1365,14 @@ math_test(
hdrs = ["RoundToIntegerTest.h"],
)
+math_test(
+ name = "llroundbf16",
+ hdrs = ["RoundToIntegerTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "llroundf",
hdrs = ["RoundToIntegerTest.h"],
@@ -1142,6 +1403,13 @@ math_test(
math_test(name = "log")
+math_test(
+ name = "log_bf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "logf")
math_test(name = "log10")
@@ -1161,6 +1429,14 @@ math_test(
hdrs = ["LogbTest.h"],
)
+math_test(
+ name = "logbbf16",
+ hdrs = ["LogbTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "logbf",
hdrs = ["LogbTest.h"],
@@ -1186,6 +1462,14 @@ math_test(
hdrs = ["RoundToIntegerTest.h"],
)
+math_test(
+ name = "lrintbf16",
+ hdrs = ["RoundToIntegerTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "lrintf",
hdrs = ["RoundToIntegerTest.h"],
@@ -1209,6 +1493,14 @@ math_test(
hdrs = ["RoundToIntegerTest.h"],
)
+math_test(
+ name = "lroundbf16",
+ hdrs = ["RoundToIntegerTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "lroundf",
hdrs = ["RoundToIntegerTest.h"],
@@ -1232,6 +1524,14 @@ math_test(
hdrs = ["ModfTest.h"],
)
+math_test(
+ name = "modfbf16",
+ hdrs = ["ModfTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "modff",
hdrs = ["ModfTest.h"],
@@ -1259,6 +1559,14 @@ math_test(
hdrs = ["NearbyIntTest.h"],
)
+math_test(
+ name = "nearbyintbf16",
+ hdrs = ["NearbyIntTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "nearbyintf",
hdrs = ["NearbyIntTest.h"],
@@ -1288,6 +1596,15 @@ math_test(
deps = ["//libc:__support_sign"],
)
+math_test(
+ name = "nextafterbf16",
+ hdrs = ["NextAfterTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ "//libc:__support_sign",
+ ],
+)
+
math_test(
name = "nextafterf",
hdrs = ["NextAfterTest.h"],
@@ -1317,6 +1634,14 @@ math_test(
hdrs = ["NextDownTest.h"],
)
+math_test(
+ name = "nextdownbf16",
+ hdrs = ["NextDownTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "nextdownf",
hdrs = ["NextDownTest.h"],
@@ -1342,6 +1667,14 @@ math_test(
hdrs = ["NextTowardTest.h"],
)
+math_test(
+ name = "nexttowardbf16",
+ hdrs = ["NextTowardTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "nexttowardf",
hdrs = ["NextTowardTest.h"],
@@ -1362,6 +1695,14 @@ math_test(
hdrs = ["NextUpTest.h"],
)
+math_test(
+ name = "nextupbf16",
+ hdrs = ["NextUpTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "nextupf",
hdrs = ["NextUpTest.h"],
@@ -1391,6 +1732,14 @@ math_test(
hdrs = ["RemQuoTest.h"],
)
+math_test(
+ name = "remquobf16",
+ hdrs = ["RemQuoTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "remquof",
hdrs = ["RemQuoTest.h"],
@@ -1416,6 +1765,14 @@ math_test(
hdrs = ["RIntTest.h"],
)
+math_test(
+ name = "rintbf16",
+ hdrs = ["RIntTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "rintf",
hdrs = ["RIntTest.h"],
@@ -1444,6 +1801,14 @@ math_test(
hdrs = ["RoundEvenTest.h"],
)
+math_test(
+ name = "roundevenbf16",
+ hdrs = ["RoundEvenTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "roundevenf",
hdrs = ["RoundEvenTest.h"],
@@ -1472,6 +1837,14 @@ math_test(
hdrs = ["RoundTest.h"],
)
+math_test(
+ name = "roundbf16",
+ hdrs = ["RoundTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "roundf",
hdrs = ["RoundTest.h"],
@@ -1503,6 +1876,17 @@ math_test(
],
)
+math_test(
+ name = "scalbnbf16",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "scalbnf",
hdrs = [
@@ -1551,6 +1935,17 @@ math_test(
],
)
+math_test(
+ name = "scalblnbf16",
+ hdrs = [
+ "LdExpTest.h",
+ "ScalbnTest.h",
+ ],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "scalblnf",
hdrs = [
@@ -1580,6 +1975,14 @@ math_test(
hdrs = ["SetPayloadTest.h"],
)
+math_test(
+ name = "setpayloadbf16",
+ hdrs = ["SetPayloadTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "setpayloadf",
hdrs = ["SetPayloadTest.h"],
@@ -1605,6 +2008,14 @@ math_test(
hdrs = ["SetPayloadSigTest.h"],
)
+math_test(
+ name = "setpayloadsigbf16",
+ hdrs = ["SetPayloadSigTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "setpayloadsigf",
hdrs = ["SetPayloadSigTest.h"],
@@ -1655,6 +2066,14 @@ math_test(
hdrs = ["TotalOrderTest.h"],
)
+math_test(
+ name = "totalorderbf16",
+ hdrs = ["TotalOrderTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "totalorderf",
hdrs = ["TotalOrderTest.h"],
@@ -1680,6 +2099,14 @@ math_test(
hdrs = ["TotalOrderMagTest.h"],
)
+math_test(
+ name = "totalordermagbf16",
+ hdrs = ["TotalOrderMagTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "totalordermagf",
hdrs = ["TotalOrderMagTest.h"],
@@ -1705,6 +2132,14 @@ math_test(
hdrs = ["TruncTest.h"],
)
+math_test(
+ name = "truncbf16",
+ hdrs = ["TruncTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "truncf",
hdrs = ["TruncTest.h"],
@@ -1733,6 +2168,14 @@ math_test(
hdrs = ["UfromfpTest.h"],
)
+math_test(
+ name = "ufromfpbf16",
+ hdrs = ["UfromfpTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "ufromfpf",
hdrs = ["UfromfpTest.h"],
@@ -1758,6 +2201,14 @@ math_test(
hdrs = ["UfromfpxTest.h"],
)
+math_test(
+ name = "ufromfpxbf16",
+ hdrs = ["UfromfpxTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "ufromfpxf",
hdrs = ["UfromfpxTest.h"],
@@ -1803,6 +2254,14 @@ math_test(
math_test(name = "expm1f16")
+math_test(
+ name = "issignalingbf16",
+ hdrs = ["IsSignalingTest.h"],
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(
name = "issignalingf16",
hdrs = ["IsSignalingTest.h"],
@@ -1822,6 +2281,15 @@ math_test(name = "log2f16")
math_test(name = "logf16")
+math_test(
+ name = "nanbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ "//libc:__support_macros_sanitizer",
+ "//libc:hdr_signal_macros",
+ ],
+)
+
math_test(
name = "nanf16",
deps = [
@@ -1838,6 +2306,13 @@ math_test(name = "sinhf16")
math_test(name = "sinpif16")
+math_test(
+ name = "tanbf16",
+ deps = [
+ "//libc:__support_fputil_bfloat16",
+ ],
+)
+
math_test(name = "tanf16")
math_test(name = "tanhf16")
More information about the llvm-commits
mailing list