Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bounds checks for fold and reduce axis inline operations #608

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

AngelEzquerra
Copy link
Contributor

The errors that you got when you tried to reduce or fold a tensor along a dimension that does not exist were pretty cryptic. Hopefully these will be an improvement.

It would be great if you could somehow refer to the "op" that is used for the reduction or the fold but I did not find a way to do it.

This PR also fixes an unrelated small typo in ast_utils.nim.

@mratsim
Copy link
Owner

mratsim commented Oct 23, 2023

It would be great if you could somehow refer to the "op" that is used for the reduction or the fold but I did not find a way to do it.

Try astToStr(op)

@AngelEzquerra
Copy link
Contributor Author

It would be great if you could somehow refer to the "op" that is used for the reduction or the fold but I did not find a way to do it.

Try astToStr(op)

Thank you. I have added the op to the reduce_axis_inline exception. I haven't added it to the fold_axis_inline one because there are 3 ops and I did not want to overcomplicate the exception message.

Also fixes a small typo in ast_utils.nim.
@mratsim mratsim merged commit f809e7f into mratsim:master Dec 30, 2023
8 checks passed
@AngelEzquerra AngelEzquerra deleted the foldreduce_axis_checks branch January 15, 2024 18:07
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.

None yet

2 participants