Skip to content

refactor: validate_tensor() #907

@ryankert01

Description

@ryankert01

Good catch, got it!

In validate_tensor has a part of it redundant as it rechecks is_pytorch_tensor(tensor), but it can also catch other hardware tensor like MPS, XLA, HPU, etc. if any.
We can refactor it and remove is_pytorch_tensor(tensor) as a followup. and the function name probably should be renamed to validate_tensor_cpu or something.

Originally posted by @ryankert01 in #881 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions