Skip to content

Commit 9d62254

Browse files
committed
Lint
1 parent a86a975 commit 9d62254

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

exir/emit/_emitter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def _tensor_spec_to_evalue(self, spec: TensorSpec) -> EValue:
361361
f"such as ConstraintBasedSymShapeEvalPass, this may be the cause of an "
362362
f"unbacked SymInt with its upper bound lazily set to 2^64-1 (uint64 max) "
363363
"during torch.export()."
364-
)
364+
),
365365
)
366366
)
367367

@@ -401,9 +401,9 @@ def _tensor_spec_to_evalue(self, spec: TensorSpec) -> EValue:
401401

402402
if allocation_info:
403403
buffer_idx = len(self.program_state.mutable_buffer)
404-
self.program_state.cached_spec_mutable_hash_values[hashed] = (
405-
buffer_idx
406-
)
404+
self.program_state.cached_spec_mutable_hash_values[
405+
hashed
406+
] = buffer_idx
407407
self.program_state.mutable_buffer.append(buffer)
408408
else:
409409
buffer_idx = len(self.program_state.constant_buffer)
@@ -1541,7 +1541,6 @@ def placeholder(
15411541
is_user_input = True
15421542

15431543
if isinstance(target, str) and isinstance(spec, TensorSpec):
1544-
15451544
fqn, is_mutable_buffer = self._find_fqn_for_placeholder(target, spec)
15461545

15471546
# From the fqn find the corresponding tensor

exir/tensor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from executorch.exir.schema import ScalarType, TensorShapeDynamism
2222
from executorch.exir.sym_util import eval_shape
2323

24+
2425
class AddressSpaceOverflowException(Exception):
2526
pass
2627

@@ -300,7 +301,9 @@ def make_allocation_info(mem_id: int, mem_offset: int) -> schema.AllocationDetai
300301
memory_offset_low = mem_offset & ((1 << 32) - 1)
301302
memory_offset_high = mem_offset >> 32
302303
if memory_offset_high >= 1 << 32:
303-
raise AddressSpaceOverflowException(f"mem_offset {mem_offset} does not fit in 64 bits")
304+
raise AddressSpaceOverflowException(
305+
f"mem_offset {mem_offset} does not fit in 64 bits"
306+
)
304307

305308
allocation_info = schema.AllocationDetails(
306309
memory_id=mem_id,

0 commit comments

Comments
 (0)