Skip to content

Iluvatar - #11

Merged
yzw234 merged 2 commits into
mainfrom
iluvatar
Aug 2, 2026
Merged

Iluvatar#11
yzw234 merged 2 commits into
mainfrom
iluvatar

Conversation

@yzw234

@yzw234 yzw234 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

天数适配初版代码合入

yuzw added 2 commits August 1, 2026 22:47
Adapt FlagTensor to Iluvatar BI-V150 (CoreX SDK 4.4.0, CUDA-compatible):

- Detect placeholder libcutensor.so shipped by the CoreX SDK (dlopens
  but lacks CUTENSOR_COMPUTE_DESC_* symbols) and mark cuTensor
  unavailable instead of crashing at import; full NVIDIA installs are
  unaffected since every probed symbol is already required there.
- New _iluvatar vendor backend: PyTorch-native ops as the vendor
  baseline (no cuTensor equivalent exists on Iluvatar), vendor
  tolerances (1e-3 benchmark-verify floor), elementwise heuristics,
  ixsmi device query.
- Route devices named 'Iluvatar ...' to the iluvatar backend in
  DeviceDetector.
- Fix a multi-process race in unary kernel codegen: write _gen_*.py
  atomically and skip rewriting unchanged content, so parallel
  run_tests.py workers can no longer read half-written files.

Verified on 4x BI-V150: python tools/run_tests.py --stages all
--gpus 0,1,2,3 -> accuracy 36/36, performance 36/36.
Contraction 0.51x -> 1.66x and ContractionTrinary 0.65x -> 2.21x
vs the Iluvatar-native baseline; suite geomean 1.82x -> 1.95x.
All changes are gated behind the iluvatar vendor; other vendors
keep byte-identical autotune spaces and launch paths.

- Append 4 BI-V150-tuned configs (small 32x32 tiles, few stages)
  to the GETT autotune space when the iluvatar backend is active.
- Break down the 'batched shapes' regression: the CoreX Triton
  fork's JITFunction.run dispatch costs ~0.15 ms per call vs ~0.01 ms
  of GPU time, which dominates host-timed paths. After the first
  autotuner-driven call, freeze the winning config into a direct
  CompiledKernel runner (~0.012 ms per call). CUDA-graph replay was
  measured but rejected (~0.06 ms GPU-side launch overhead).
- Time the production two-step GETT path in the ContractionTrinary
  benchmark for fp32 as well (the op never dispatches the fused
  kernel: _supports_fused_triton_trinary() is always False).
@yzw234
yzw234 merged commit 3b78844 into main Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant