Skip to content

Commit 05f60d7

Browse files
committed
quick lint
Signed-off-by: kvmto <kmato@nvidia.com>
1 parent 7cdf556 commit 05f60d7

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

code/evaluation/logical_error_rate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@
5555
from typing import Optional
5656

5757
_compile_disabled = os.environ.get("PREDECODER_TORCH_COMPILE", "").strip().lower() in (
58-
"0", "false", "no", "off",
58+
"0",
59+
"false",
60+
"no",
61+
"off",
5962
)
6063

6164

code/qec/surface_code/homological_equivalence_torch.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
import torch
4444

4545
_compile_disabled = os.environ.get("PREDECODER_TORCH_COMPILE", "").strip().lower() in (
46-
"0", "false", "no", "off",
46+
"0",
47+
"false",
48+
"no",
49+
"off",
4750
)
4851

4952

@@ -823,7 +826,9 @@ def _get_compiled_seq_wr(num_layers: int):
823826
def _wr_fn(error_f, padded_masks, is_boundary, layer_valid):
824827
return _wr_seq_step_nobreak(error_f, padded_masks, is_boundary, layer_valid, nl)
825828

826-
compiled = torch.compile(_wr_fn, mode="reduce-overhead", fullgraph=True, disable=_compile_disabled)
829+
compiled = torch.compile(
830+
_wr_fn, mode="reduce-overhead", fullgraph=True, disable=_compile_disabled
831+
)
827832
_compiled_seq_wr_cache[key] = compiled
828833
return compiled
829834

@@ -2221,7 +2226,9 @@ def _timelike_loop(
22212226

22222227
return x_work, z_work, sz_work, sx_work
22232228

2224-
compiled = torch.compile(_timelike_loop, mode="reduce-overhead", fullgraph=True, disable=_compile_disabled)
2229+
compiled = torch.compile(
2230+
_timelike_loop, mode="reduce-overhead", fullgraph=True, disable=_compile_disabled
2231+
)
22252232
_compiled_timelike_cache[key] = compiled
22262233
return compiled
22272234

@@ -2289,7 +2296,9 @@ def _w2_loop(
22892296

22902297
return x_work, z_work, sz_work, sx_work
22912298

2292-
compiled = torch.compile(_w2_loop, mode="max-autotune", fullgraph=True, disable=_compile_disabled)
2299+
compiled = torch.compile(
2300+
_w2_loop, mode="max-autotune", fullgraph=True, disable=_compile_disabled
2301+
)
22932302
_compiled_weight2_cache[key] = compiled
22942303
return compiled
22952304

0 commit comments

Comments
 (0)