mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Enable all SIM rules except disabled ones (#164645)
`SIM` rules are useful for simplifying boolean expressions and enhances code readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/164645 Approved by: https://github.com/ezyang, https://github.com/mlazos
This commit is contained in:
committed by
PyTorch MergeBot
parent
f1d882212a
commit
e925dfcc6b
@ -4060,7 +4060,7 @@ def run(runner, args, original_dir=None):
|
||||
else:
|
||||
optimize_ctx = torch._dynamo.optimize(args.backend, nopython=args.nopython)
|
||||
experiment = (
|
||||
speedup_experiment if not args.backend == "torchao" else latency_experiment
|
||||
speedup_experiment if args.backend != "torchao" else latency_experiment
|
||||
)
|
||||
if args.accuracy:
|
||||
output_filename = f"accuracy_{args.backend}.csv"
|
||||
|
@ -271,7 +271,7 @@ def run_single_backend_sdpa(
|
||||
|
||||
if config.calculate_bwd_time:
|
||||
# TODO: debug backward pass for njt
|
||||
if eager_sdpa and not config.attn_type == "document_mask":
|
||||
if eager_sdpa and config.attn_type != "document_mask":
|
||||
d_out = torch.randn_like(out_eager.transpose(1, 2)).transpose(1, 2)
|
||||
backward_eager_time = benchmark_torch_function_in_microseconds(
|
||||
out_eager.backward, d_out, retain_graph=True
|
||||
|
Reference in New Issue
Block a user