MCPcopy Create free account
hub / github.com/ByteDance-Seed/Triton-distributed / build_kernel

Function build_kernel

python/little_kernel/benchmark/utils.py:97–111  ·  view source on GitHub ↗

Build a LittleKernel kernel with standard passes.

(kernel_func, grid, block, shared_mem_bytes=0, arch=None, verbose=False)

Source from the content-addressed store, hash-verified

95
96
97def build_kernel(kernel_func, grid, block, shared_mem_bytes=0, arch=None, verbose=False):
98 """Build a LittleKernel kernel with standard passes."""
99 passes = PASSES["cuda"]
100 if arch is None:
101 cap = torch.cuda.get_device_capability()
102 arch = f"sm_{cap[0]}{cap[1]}"
103 return kernel_func.build(
104 passes,
105 codegen_cuda,
106 grid=grid,
107 block=block,
108 shared_mem_bytes=shared_mem_bytes,
109 arch=arch,
110 verbose=verbose,
111 )
112
113
114def compile_kernel(kernel_func):

Callers 15

run_bandwidth_benchmarkFunction · 0.90
run_stride_benchmarkFunction · 0.90
run_latency_benchmarkFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls 1

buildMethod · 0.45

Tested by

no test coverage detected