Skip to content

Commit

Permalink
[Paddle] Update _backends.py to support pir.Value (#353)
Browse files Browse the repository at this point in the history
* Update _backends.py

"use paddle.is_tensor instead of isinstance to support pir.Value type"

* Update _backends.py
  • Loading branch information
HydrogenSulfate authored Dec 16, 2024
1 parent 5906eb8 commit 1bee724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion einops/_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def __init__(self):
self.paddle = paddle

def is_appropriate_type(self, tensor):
return isinstance(tensor, (self.paddle.Tensor, self.paddle.static.Variable))
return self.paddle.is_tensor(tensor)

def from_numpy(self, x):
tensor = self.paddle.to_tensor(x)
Expand Down

0 comments on commit 1bee724

Please sign in to comment.