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] [ir] Refactor indexing expressions in AST & enforce integer indices #5138

Merged
merged 3 commits into from
Jun 20, 2022

Conversation

re-xyr
Copy link
Contributor

@re-xyr re-xyr commented Jun 12, 2022

Related issue = (none)

Before:

expression type operand provide shape & stride mode of access
GlobalPtrExpression field & extarr no global
TensorElementExpression local tensor & global tensor yes global & local

After:

expression type operand provide shape & stride mode of access
IndexExpression field & extarr & local tensor no global & local
StrideExpression global tensor yes global

This unifies all access modes except for global tensors, because they are essentially a hack at this time.

@netlify
Copy link

netlify bot commented Jun 12, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit f9c8839
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62afea3400d4dd00099542f2
😎 Deploy Preview https://deploy-preview-5138--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

@strongoier strongoier left a comment

Choose a reason for hiding this comment

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

Awesome!!

BTW could you run examples to see if enforcing integer indices will break things? If so fix those examples plz :-)

Copy link
Contributor

@strongoier strongoier left a comment

Choose a reason for hiding this comment

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

nit: resolve conflicts & close local formatter to avoid accidental changes :-)

@strongoier strongoier merged commit dde677d into taichi-dev:master Jun 20, 2022
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.

3 participants