We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3c4ab53 commit 37dab27Copy full SHA for 37dab27
gemlite/triton_kernels/utils.py
@@ -55,7 +55,7 @@ def gpu_has_more_shared_memory(ref_gpus = ['a100', 'h100', 'h200', 'h800']):
55
56
#Next power of 2
57
M_MAXVAL = 1024
58
-M_MAPPING = {M:min(2 ** int(math.ceil(math.log2(M))), M_MAXVAL) if (M > 0) else 0 for M in range(M_MAXVAL)}
+M_MAPPING = {M:min(2 ** int(math.ceil(math.log2(M))), M_MAXVAL) if (M > 0) else 0 for M in range(M_MAXVAL + 1)}
59
def get_closest_m_fast_autotune(M):
60
return M_MAPPING[M] if M <= M_MAXVAL else M_MAXVAL
61
0 commit comments