hip matmul

This commit is contained in:
George Hotz
2023-06-28 19:21:01 +00:00
parent 754e54ebb9
commit 0e93b9642a
3 changed files with 78 additions and 1 deletions

View File

@@ -55,7 +55,7 @@ class HIPCodegen(CStyleCodegen):
lang = CStyleLanguage(
kernel_prefix = "#define INFINITY (__builtin_inff())\nextern \"C\" __global__", smem_prefix = "__shared__ ", barrier = "__syncthreads();", float4 = "make_float4",
half_prekernel = "",
gid = [f'blockDim.{chr(120+i)}*blockIdx.{chr(120+i)}+threadIdx.{chr(120+i)}' for i in range(3)],
gid = [f'blockIdx.{chr(120+i)}' for i in range(3)],
lid = [f'threadIdx.{chr(120+i)}' for i in range(3)])
HIPBuffer = Compiled(RawHIPBuffer, HIPCodegen, HIPProgram, hip.hipDeviceSynchronize)