[IR] Added IR and Codegen support for atomic_rmw (#120)

This commit is contained in:
Philippe Tillet
2021-05-25 18:31:48 -04:00
committed by Philippe Tillet
parent 59b0ac672a
commit 0274429429
17 changed files with 261 additions and 124 deletions

View File

@@ -76,7 +76,7 @@ def random(shape, dtype, device):
if dtype in [torch.int8, torch.int16, torch.int32, torch.int64]:
return torch.randint(1, 32, shape, dtype=dtype, device=device)
if dtype in [torch.float16, torch.float32, torch.float64]:
return torch.randn(shape, dtype=dtype, device=device)
return torch.normal(0, 10, shape, dtype=dtype, device=device)
raise RuntimeError(f'Unknown dtype {dtype}')