Skip to content

fix: take number of dimensions into account when computing axis#592

Open
govereau wants to merge 1 commit intomainfrom
pg/axis
Open

fix: take number of dimensions into account when computing axis#592
govereau wants to merge 1 commit intomainfrom
pg/axis

Conversation

@govereau
Copy link
Collaborator

@govereau govereau commented Feb 6, 2026

When computing the axis parameter for tensor_reduce, we need to also take into account the number of dimensions in the tensor.

When computing the axis parameter for tensor_reduce, we need
to also take into account the number of dimensions in the
tensor.
def dimsFromPythonDefs (dims : Int) (d : Sum Int (List Int)) : Trace TensorSubDim :=
match d with
| .inl 1 => return .X
| .inl _ => throw "not a valid dim"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aws-qieqingy does this look right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants