Repository navigation
[Feature] 2-SM support for TMA, TMEM and TCGEN5MMA on Blackwell #1882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9f9677a
fbc6bec
4dc2901
9b048a4
2fc3064
8b27b40
ae83639
d45865a
d2d7111
20f01be
ebb8b76
150fb9b
6ddea2a
ec9cef9
dcc1bae
d09fc92
a76f221
28617da
d229491
dbc9388
a01e62d
5ddea83
d832d14
97beb2c
9572c64
15e3048
d901fed
605d9dc
2ec5fe8
4131990
33ac055
1caa424
6c09a53
d174892
6e698b7
3795413
d42abc8
e7e03b6
28f4224
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| #pragma once | ||
|
|
||
| #ifndef __CUDACC_RTC__ | ||
| #include <cuda_runtime.h> | ||
| #include <cstdio> | ||
| #include <cstdlib> | ||
| #include <cuda_runtime.h> | ||
| #endif | ||
|
|
||
| #include "atomic.h" | ||
|
|
@@ -60,14 +60,22 @@ using int4_t = int4; | |
| } while (0) | ||
|
|
||
| #if defined(__CUDA_ARCH__) | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { printf("%s, %s:%d\n", msg, __FILE__, __LINE__); __trap(); } while(0) | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { \ | ||
| printf("%s, %s:%d\n", msg, __FILE__, __LINE__); \ | ||
| __trap(); \ | ||
| } while (0) | ||
| #elif defined(__CUDACC_RTC__) | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { __builtin_trap(); } while(0) | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { \ | ||
| __builtin_trap(); \ | ||
| } while (0) | ||
|
Comment on lines
+62
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's look at the file and surrounding context
cat -n src/tl_templates/cuda/common.h | head -100Repository: tile-ai/tilelang Length of output: 4549 🏁 Script executed: # Search for other uses of these macros in the codebase to understand the pattern
rg "__CUDACC_RTC__|__CUDA_ARCH__" --type h --type cpp -B 2 -A 2Repository: tile-ai/tilelang Length of output: 7481 🏁 Script executed: # Check if there are any comments or documentation about this macro
rg "TILELANG_UNREACHABLE|__builtin_trap|printf.*trap" --type h --type cpp -B 3 -A 3Repository: tile-ai/tilelang Length of output: 5186 🌐 Web query:
💡 Result: In NVRTC (CUDA runtime compilation), these macros behave essentially the same as in offline
Practical NVRTC example:
Citations:
Check NVRTC defines both macros during device compilation. The current ordering causes the 🛠️ Suggested fix-#if defined(__CUDA_ARCH__)
-#define TILELANG_UNREACHABLE(msg) \
- do { \
- printf("%s, %s:%d\n", msg, __FILE__, __LINE__); \
- __trap(); \
- } while (0)
-#elif defined(__CUDACC_RTC__)
+#if defined(__CUDACC_RTC__)
`#define` TILELANG_UNREACHABLE(msg) \
do { \
__builtin_trap(); \
} while (0)
+#elif defined(__CUDA_ARCH__)
+#define TILELANG_UNREACHABLE(msg) \
+ do { \
+ printf("%s, %s:%d\n", msg, __FILE__, __LINE__); \
+ __trap(); \
+ } while (0)
`#else`🤖 Prompt for AI Agents |
||
| #else | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { fprintf(stderr, "%s, %s:%d\n", msg, __FILE__, __LINE__); abort(); } while(0) | ||
| #define TILELANG_UNREACHABLE(msg) \ | ||
| do { \ | ||
| fprintf(stderr, "%s, %s:%d\n", msg, __FILE__, __LINE__); \ | ||
| abort(); \ | ||
| } while (0) | ||
| #endif | ||
|
|
||
| // using cutlass abs function for half_t | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.