Skip to content

Commit

Permalink
Fix arm_backend.py script (pytorch#1120)
Browse files Browse the repository at this point in the history
Summary:
data["scratch_shape"][0] is a number.

Pull Request resolved: pytorch#1120

Reviewed By: digantdesai

Differential Revision: D50863106

Pulled By: kirklandsign

fbshipit-source-id: 933ed4750a2f615244d5d8af01ff12f0814bb6b2
  • Loading branch information
kirklandsign authored and facebook-github-bot committed Nov 1, 2023
1 parent 2535a25 commit 3b0c760
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backends/arm/arm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ def vela_compile(tosa_fb):
# Add a block for scratch, inputs and outputs; scratch shape is a 1 element
# array giving us size in bytes so extract this and add a block of 0's.
# Currently we preallocated this on the host to provide SRAM for computation.
if not isinstance(data["scratch_shape"][0], np.int64):
raise RuntimeError("Expected scratch to be int64")
block_length = int(data["scratch_shape"][0])
bin_blocks["scratch_data"] = b"\x00" * block_length

Expand Down

0 comments on commit 3b0c760

Please sign in to comment.