Skip to content

Conversation

SamGinzburg
Copy link

@SamGinzburg SamGinzburg commented Sep 23, 2025

When compiling include/cute/arch/copy_sm100.hpp with clang instead of nvcc the following inline asm causes syntax errors.

errors look like:

cutlass/include/cute/arch/copy_sm100.hpp:335:22: error: expected ')'
  335 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:354:22: error: expected ')'
  354 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:372:22: error: expected ')'
  372 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:390:22: error: expected ')'
  390 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:410:22: error: expected ')'
  410 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:429:22: error: expected ')'
  429 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^
cutlass/include/cute/arch/copy_sm100.hpp:448:22: error: expected ')'
  448 |     : "r"(dst_addr)  "l"(src_addr));
      |                      ^

Testing:

I built cutlass with these fixes and don't get compiler errors with clang or nvcc.

@Artem-B
Copy link
Contributor

Artem-B commented Sep 23, 2025

Interestingly enough, NVCC appears to accept inline asm arguments without the comma separator: https://godbolt.org/z/1MchKsT86

That explains why it went unnoticed till now.

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.

2 participants