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

[Lang] Warn users if ndarray size is out of int32 boundary #6846

Merged
merged 4 commits into from
Dec 13, 2022

Conversation

strongoier
Copy link
Contributor

Issue: fix #6758

Brief Summary

This PR adds a boundary check for ndarray similar to

if (acc_shape > std::numeric_limits<int>::max()) {
TI_WARN(
"SNode index might be out of int32 boundary but int64 indexing is not "
"supported yet. Struct fors might not work either.");
}

@netlify
Copy link

netlify bot commented Dec 9, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit cbdb7e2
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/6392ac2a2d4b3c0008a7df8d
😎 Deploy Preview https://deploy-preview-6846--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Thanks!

@strongoier strongoier merged commit 96e7957 into taichi-dev:master Dec 13, 2022
@strongoier strongoier deleted the fix-6758 branch December 13, 2022 07:12
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…v#6846)

Issue: fix taichi-dev#6758

### Brief Summary

This PR adds a boundary check for ndarray similar to
https://github.com/taichi-dev/taichi/blob/a87b98fd40fc93dbe1bdf8c4e3932a6078379fa3/taichi/ir/snode.cpp#L89-L93

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

Warning required when total size of indices is greater than INT_MAX
2 participants