[FRONTEND] Now using exist_ok=True when creating cache directories (#288)
This commit is contained in:
9
.github/workflows/integration-tests.yml
vendored
9
.github/workflows/integration-tests.yml
vendored
@@ -24,6 +24,11 @@ jobs:
|
|||||||
cd python
|
cd python
|
||||||
pip3 install -e .
|
pip3 install -e .
|
||||||
|
|
||||||
|
- name: Unit tests
|
||||||
|
run: |
|
||||||
|
cd python/test/unit
|
||||||
|
pytest -vs .
|
||||||
|
|
||||||
- name: Regression tests
|
- name: Regression tests
|
||||||
run: |
|
run: |
|
||||||
cd python/test/regression
|
cd python/test/regression
|
||||||
@@ -33,7 +38,3 @@ jobs:
|
|||||||
sudo nvidia-smi -i 0 -rgc
|
sudo nvidia-smi -i 0 -rgc
|
||||||
sudo nvidia-smi -i 0 -rmc
|
sudo nvidia-smi -i 0 -rmc
|
||||||
|
|
||||||
- name: Unit tests
|
|
||||||
run: |
|
|
||||||
cd python/test/unit
|
|
||||||
pytest -vs .
|
|
@@ -52,7 +52,7 @@ def test_matmul(M, N, K):
|
|||||||
cur_sm_clock = nvsmi(['clocks.current.sm'])[0]
|
cur_sm_clock = nvsmi(['clocks.current.sm'])[0]
|
||||||
ref_sm_clock = 1350
|
ref_sm_clock = 1350
|
||||||
max_gpu_perf = 1e-6*80*8*128*cur_sm_clock
|
max_gpu_perf = 1e-6*80*8*128*cur_sm_clock
|
||||||
assert abs(cur_sm_clock - ref_sm_clock) < 5, f'GPU SMs must run at {ref_sm_clock} MHz'
|
assert abs(cur_sm_clock - ref_sm_clock) < 10, f'GPU SMs must run at {ref_sm_clock} MHz'
|
||||||
a = torch.randn((M, K), dtype=torch.float16, device='cuda')
|
a = torch.randn((M, K), dtype=torch.float16, device='cuda')
|
||||||
b = torch.randn((K, N), dtype=torch.float16, device='cuda')
|
b = torch.randn((K, N), dtype=torch.float16, device='cuda')
|
||||||
fn = lambda: triton.ops.matmul(a, b)
|
fn = lambda: triton.ops.matmul(a, b)
|
||||||
@@ -95,7 +95,7 @@ def test_elementwise(N):
|
|||||||
cur_mem_clock = nvsmi(['clocks.current.memory'])[0]
|
cur_mem_clock = nvsmi(['clocks.current.memory'])[0]
|
||||||
ref_mem_clock = 877
|
ref_mem_clock = 877
|
||||||
max_gpu_perf = 512*2*ref_mem_clock*1e-3
|
max_gpu_perf = 512*2*ref_mem_clock*1e-3
|
||||||
assert abs(cur_mem_clock - ref_mem_clock) < 5, f'GPU memmory must run at {ref_mem_clock} MHz'
|
assert abs(cur_mem_clock - ref_mem_clock) < 10, f'GPU memmory must run at {ref_mem_clock} MHz'
|
||||||
z = torch.empty((N, ), dtype=torch.float16, device='cuda')
|
z = torch.empty((N, ), dtype=torch.float16, device='cuda')
|
||||||
x = torch.randn_like(z)
|
x = torch.randn_like(z)
|
||||||
y = torch.randn_like(z)
|
y = torch.randn_like(z)
|
||||||
|
@@ -709,7 +709,7 @@ class JITFunction:
|
|||||||
return
|
return
|
||||||
# create cache directory
|
# create cache directory
|
||||||
if not os.path.exists(cache_dir):
|
if not os.path.exists(cache_dir):
|
||||||
os.makedirs(cache_dir)
|
os.makedirs(cache_dir, exist_ok=True)
|
||||||
# create md5 hash of src
|
# create md5 hash of src
|
||||||
md5 = hashlib.md5()
|
md5 = hashlib.md5()
|
||||||
md5.update(self.src.encode('utf-8'))
|
md5.update(self.src.encode('utf-8'))
|
||||||
|
Reference in New Issue
Block a user