Skip to content

Disallow operations on scalar tensors that are no-ops #794

Open
@reillyeon

Description

@reillyeon

There are a number of operators, such as transpose() and reshape() which are no-ops when applied to a scalar tensor. In addition there are operators like gather() which expect indices but a scalar doesn't have indices.

While implementations can work around this (typically by treating a scalar as a single-element 1D tensor) it seems better to simply disallow these cases which add complexity without adding any expressivity.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions