Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

test(fp8): mirror the Windows CFLAGS in the e2e harness build (#1413)

dajiaohuang8ae8758659d0
diff --git a/c/tests/test_fp8_e2e_repack_load.py b/c/tests/test_fp8_e2e_repack_load.py
index ee505676..6373ddaf 100644
--- a/c/tests/test_fp8_e2e_repack_load.py
+++ b/c/tests/test_fp8_e2e_repack_load.py
@@ -69,9 +69,19 @@ def _cc_flags():
# becomes a -Wunknown-pragmas warning (-Wall enables it), and the assertion
# below requires an empty stderr -- so on Linux this test failed for a
# reason that had nothing to do with what it is testing. macOS gets the
- # libomp probe just below; Windows/MinGW is left alone.
+ # libomp probe just below.
cflags += ["-fopenmp"]
ldflags += ["-fopenmp"]
+ if sys.platform == "win32":
+ # MinGW mirrors CFLAGS too, rather than being left alone. compat.h
+ # refuses to compile a Windows off_t that is not 64-bit, and the
+ # Makefile passes -D_FILE_OFFSET_BITS=64 (and -fopenmp) on Windows as
+ # well. Without the define the harness died on the #error, so this test
+ # could only ever run where torch is absent -- i.e. it skipped on CI's
+ # Windows job and failed on any Windows box that had torch installed,
+ # for a reason that had nothing to do with what it is testing.
+ cflags += ["-D_FILE_OFFSET_BITS=64", "-fopenmp"]
+ ldflags += ["-fopenmp"]
if sys.platform == "darwin":
try:
prefix = subprocess.run(["brew", "--prefix", "libomp"], capture_output=True,