mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[easy] fix f-string messages in torch/_ops.py (#132531)
I encountered these when making this change:
```
diff --git a/test/functorch/test_ac.py b/test/functorch/test_ac.py
index 3a2e07fa147..a4d003399e7 100644
--- a/test/functorch/test_ac.py
+++ b/test/functorch/test_ac.py
@@ -259,15 +259,8 @@ class MemoryBudgetTest(TestCase):
expected = call()
for budget in range(0, 11):
- memory_budget = budget / 10
- torch._dynamo.reset()
- with config.patch(activation_memory_budget=memory_budget):
- if memory_budget is not None:
- f_compile = torch.compile(
- call, backend="aot_eager_decomp_partition"
- )
-
- self.assertEqual(expected, f_compile())
+ get_mem_and_flops(call, memory_budget=budget / 10)
+
def test_prioritize_cheaper_matmul(self):
def f(xs, ws):
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132531
Approved by: https://github.com/Skylion007
This commit is contained in:
parent
aec948adfc
commit
e1c2bdac2f
|
|
@ -334,7 +334,7 @@ class HigherOrderOperator(OperatorBase):
|
|||
result = handler(mode, *args, **kwargs)
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
"There was no rule registered for HOP {self._name} and mode {curr_mode}. "
|
||||
f"There was no rule registered for HOP {self._name} and mode {curr_mode}. "
|
||||
"We recommend filing an issue."
|
||||
)
|
||||
if result is not NotImplemented:
|
||||
|
|
@ -355,7 +355,7 @@ class HigherOrderOperator(OperatorBase):
|
|||
result = handler(*args, **kwargs)
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
"There was no rule registered for HOP {self._name} and subclass {subclass_type}. "
|
||||
f"There was no rule registered for HOP {self._name} and subclass {subclass_type}. "
|
||||
"We recommend filing an issue."
|
||||
)
|
||||
if result is not NotImplemented:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user