Skip to content

Commit d744d6a

Browse files
authored
Qualcomm AI Engine Direct - Fixed arange dtype (#19204)
1 parent e270e8f commit d744d6a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backends/qualcomm/builders/op_arange.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ def define_node(
2727
) -> PyQnnManager.PyQnnOpWrapper:
2828
start, end = node.args[0:2]
2929
step = node.args[2] if len(node.args) > 2 else 1
30-
out_tensor = torch.arange(start, end, step)
30+
arange_tensor = self.get_tensor(node, node)
31+
out_tensor = torch.arange(start, end, step).to(arange_tensor.dtype)
3132

3233
# since we can derive the constant value of current op in AoT stage
3334
# we only build static tensor here for consumers of current node

0 commit comments

Comments
 (0)