Skip to content

Fix SM90 MegaMoE .template disambiguation on nvcc13 - #74

Open
Helicoplacoidea wants to merge 1 commit into
sgl-project:devfrom
Helicoplacoidea:sgl-fix
Open

Fix SM90 MegaMoE .template disambiguation on nvcc13#74
Helicoplacoidea wants to merge 1 commit into
sgl-project:devfrom
Helicoplacoidea:sgl-fix

Conversation

@Helicoplacoidea

@Helicoplacoidea Helicoplacoidea commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Pure compile-fix for SM90 FP8 MegaMoE on nvcc 13.x. Adds the standard dependent-name disambiguator .template to four chained …get_data_buffer(…).get_base_ptr<float>() call sites in sm90_fp8_mega_moe_impl().

Problem

On nvcc 13.x (EDG frontend), the chained call

(*l1_topk_weights_buffer).get_data_buffer(idx).get_base_ptr<float>()

fails to compile inside the deferred/dependent scope of the SM90 MegaMoE epilogue, with:

error: type name is not allowed
error: expected an expression

because EDG parses the unqualified < as the less-than operator instead of the start of an explicit template-argument list.

Fix

Add the standard dependent-name disambiguator .template to the four chained .get_data_buffer(…).get_base_ptr<float>() call sites reported by nvcc13 (L1655 / L1666 / L1824 / L1827):

-    .get_base_ptr<float>();
+    .template get_base_ptr<float>();

Compatibility

Behavior is unchanged on nvcc ≤ 12, where .template is a no-op when not strictly required.

Test Plan

  • nvcc 13.x: JIT SM90 fp8 mega-moe kernel compiles.
  • nvcc 12.x: regress to the same kernel, confirm no behavior change.

…plate on nvcc13

On nvcc 13.x (EDG frontend), the chained call
  (*l1_topk_weights_buffer).get_data_buffer(idx).get_base_ptr<float>()
fails to compile inside the deferred/dependent scope of the SM90 MegaMoE
epilogue, with:
  error: type name is not allowed
  error: expected an expression
because EDG parses the unqualified '<' as the less-than operator instead
of the start of an explicit template-argument list.

Add the standard dependent-name disambiguator `.template` to the four
chained `.get_data_buffer(...).get_base_ptr<float>()` call sites in
sm90_fp8_mega_moe_impl() that are reported by nvcc13 (L1655/L1666/L1824/L1827).
Behavior is unchanged on nvcc <= 12 where `.template` is a no-op when not
strictly required, so this is a pure compile-fix.
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