mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-08 22:48:25 -05:00
strip whitespace
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
repos:
|
repos:
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
|
- id: whitespace
|
||||||
|
name: strip whitespace
|
||||||
|
entry: ./strip_whitespace.sh
|
||||||
|
language: system
|
||||||
|
always_run: true
|
||||||
|
pass_filenames: false
|
||||||
- id: mypy
|
- id: mypy
|
||||||
name: mypy
|
name: mypy
|
||||||
entry: mypy tinygrad/ extra/helpers.py
|
entry: mypy tinygrad/ extra/helpers.py
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ class CUDALanguage(CStyleLanguage):
|
|||||||
smem_prefix = "__shared__ "
|
smem_prefix = "__shared__ "
|
||||||
smem_prefix_for_cast = False
|
smem_prefix_for_cast = False
|
||||||
arg_int_prefix = "const int"
|
arg_int_prefix = "const int"
|
||||||
barrier = "__syncthreads();"
|
barrier = "__syncthreads();"
|
||||||
float4 = "make_float4"
|
float4 = "make_float4"
|
||||||
gid = [f'blockIdx.{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)]
|
lid = [f'threadIdx.{chr(120+i)}' for i in range(3)]
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class HIPLanguage(CStyleLanguage):
|
|||||||
smem_prefix_for_cast=False
|
smem_prefix_for_cast=False
|
||||||
barrier = "__syncthreads();"
|
barrier = "__syncthreads();"
|
||||||
float4 = "make_float4"
|
float4 = "make_float4"
|
||||||
uses_vload=True
|
uses_vload=True
|
||||||
uses_ptr_arithmetic=True
|
uses_ptr_arithmetic=True
|
||||||
arg_int_prefix = "const int"
|
arg_int_prefix = "const int"
|
||||||
half_prekernel = "#include <hip/hip_fp16.h>\nusing half4 = HIP_vector_type<half, 4>;" + """
|
half_prekernel = "#include <hip/hip_fp16.h>\nusing half4 = HIP_vector_type<half, 4>;" + """
|
||||||
|
|||||||
Reference in New Issue
Block a user