diff options
author | brkirch <brkirch@users.noreply.github.com> | 2023-08-07 10:20:10 -0400 |
---|---|---|
committer | brkirch <brkirch@users.noreply.github.com> | 2023-08-13 10:07:52 -0400 |
commit | 5df535b7c2374c3324485faaea62fbdbffc71f71 (patch) | |
tree | 3fced6548a3daaabeb8ee007dba7f2fb8a44d292 | |
parent | 232c931f4082ea73bbaca8f77469cfea9d5db459 (diff) |
Remove duplicate code for torchsde randn
-rw-r--r-- | modules/mac_specific.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/modules/mac_specific.py b/modules/mac_specific.py index bce527cc..89256c5b 100644 --- a/modules/mac_specific.py +++ b/modules/mac_specific.py @@ -52,9 +52,6 @@ def cumsum_fix(input, cumsum_func, *args, **kwargs): if has_mps: - # MPS fix for randn in torchsde - CondFunc('torchsde._brownian.brownian_interval._randn', lambda _, size, dtype, device, seed: torch.randn(size, dtype=dtype, device=torch.device("cpu"), generator=torch.Generator(torch.device("cpu")).manual_seed(int(seed))).to(device), lambda _, size, dtype, device, seed: device.type == 'mps') - if platform.mac_ver()[0].startswith("13.2."): # MPS workaround for https://github.com/pytorch/pytorch/issues/95188, thanks to danieldk (https://github.com/explosion/curated-transformers/pull/124) CondFunc('torch.nn.functional.linear', lambda _, input, weight, bias: (torch.matmul(input, weight.t()) + bias) if bias is not None else torch.matmul(input, weight.t()), lambda _, input, weight, bias: input.numel() > 10485760) |