Open tonyjie opened 3 days ago
@alihassanijr , could you please help with this?
Thanks for the detailed description @tonyjie .
Regarding 1, you are correct, CUTLASS_LIBRARY_INSTANTIATION_LEVEL
is limited to pre-defined string levels like "default"
and "max"
. I don't exactly remember why that was, some of it was to preserve previous behavior, but if we want to directly expose the numeric levels to users, we can do that. I'll have to defer to @hwu36 to make that call.
Regarding 2, unfortunately that looks like a much deeper issue, which is that the heuristics set up in the refactored generator don't catch all "invalid" kernels. I'll try and see if I can build with the "max"
level and add the necessary heuristics. I'll update this issue soon.
Describe the bug 1st bug: 4-digit
CUTLASS_LIBRARY_INSTANTIATION_LEVEL
is not used. Here it said that CUTLASS 3.6 profiler can use an additional flag,CUTLASS_LIBRARY_INSTANTIATION_LEVEL
, to instantiate all possible combinations. It also said that "The CUTLASS profiler employs a four-digit integer level (global instantiation level) mechanism to manage the generation of kernel configurations.".However, I found that this 4-digit
CUTLASS_LIBRARY_INSTANTIATION_LEVEL
is not used when compiling, unless it is set tomax
.The process of reading
CUTLASS_LIBRARY_INSTANTIATION_LEVEL
is as follows:generator.py
reads this argument.__init__()
of classManifest
. It's also effective when it is set it tomax
.GenerateSM90
kernels,get_sm90_instantiation_level()
function only returns some fixed default level.2nd bug: when I manually modify the default level in the
generator.py
, I get compile error with warp specialization kernels (it says stage < 2).The error message when
make cutlass_profiler
is as follows:Steps/Code to reproduce bug
default_level=131
todefault_level=1592
; change this line'sdefault_level=101
todefault_level=1592
.This compile error also occurs when building FP8 kernels.
Additional context Also, when simply set
CUTLASS_LIBRARY_INSTANTIATION_LEVEL
tomax
, we will also get compile error when building lots of rare shapes like this