From c42d2c47310b90e3c85ff2221b3f5f92e9f976fc Mon Sep 17 00:00:00 2001 From: George Hotz Date: Sat, 25 Nov 2023 14:09:06 -0800 Subject: [PATCH] strip whitespace --- .pre-commit-config.yaml | 6 ++++++ tinygrad/renderer/cuda.py | 2 +- tinygrad/renderer/hip.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3d82597..2877d2f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,12 @@ repos: - repo: local hooks: + - id: whitespace + name: strip whitespace + entry: ./strip_whitespace.sh + language: system + always_run: true + pass_filenames: false - id: mypy name: mypy entry: mypy tinygrad/ extra/helpers.py diff --git a/tinygrad/renderer/cuda.py b/tinygrad/renderer/cuda.py index 9e6d0d60..3d29227b 100644 --- a/tinygrad/renderer/cuda.py +++ b/tinygrad/renderer/cuda.py @@ -6,7 +6,7 @@ class CUDALanguage(CStyleLanguage): smem_prefix = "__shared__ " smem_prefix_for_cast = False arg_int_prefix = "const int" - barrier = "__syncthreads();" + barrier = "__syncthreads();" float4 = "make_float4" gid = [f'blockIdx.{chr(120+i)}' for i in range(3)] lid = [f'threadIdx.{chr(120+i)}' for i in range(3)] diff --git a/tinygrad/renderer/hip.py b/tinygrad/renderer/hip.py index 1e7e9112..4005009f 100644 --- a/tinygrad/renderer/hip.py +++ b/tinygrad/renderer/hip.py @@ -19,7 +19,7 @@ class HIPLanguage(CStyleLanguage): smem_prefix_for_cast=False barrier = "__syncthreads();" float4 = "make_float4" - uses_vload=True + uses_vload=True uses_ptr_arithmetic=True arg_int_prefix = "const int" half_prekernel = "#include \nusing half4 = HIP_vector_type;" + """