add tvm example, formatting (#1813)

* add tvm example

* no realize
This commit is contained in:
George Hotz
2023-09-07 11:50:41 -07:00
committed by GitHub
parent 5b15a972b5
commit 4613c9e77c
7 changed files with 54 additions and 8 deletions

View File

@@ -104,7 +104,7 @@ class CLProgram:
return None
renderer = functools.partial(uops_to_cstyle, CStyleLanguage(
kernel_prefix = "__kernel", buffer_prefix = "__global ", smem_prefix = "__local ", arg_int_prefix = "const int",
kernel_prefix = "__kernel ", buffer_prefix = "__global ", smem_prefix = "__local ", arg_int_prefix = "const int",
half_prekernel = "#pragma OPENCL EXTENSION cl_khr_fp16 : enable",
barrier = "barrier(CLK_LOCAL_MEM_FENCE);", float4 = "(float4)",
gid = [f'get_group_id({i})' for i in range(3)], lid = [f'get_local_id({i})' for i in range(3)], uses_vload=True))