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

[opengl] Use element shape as compile information for OpenGL backend #4284

Merged
merged 7 commits into from
Feb 22, 2022
Merged

[opengl] Use element shape as compile information for OpenGL backend #4284

merged 7 commits into from
Feb 22, 2022

Conversation

turbo0628
Copy link
Member

Related issue = #3903

Motivation:

Taichi automatically re-compiles the kernel when element shapes change. Therefore, element shape is compile-time static. This PR embed the element shape information into shader code for OpenGL backend.

Briefings:

  • Changed ExternalTensorExpression and ExternalPtrStmt to get layout and element shape information.
  • Changed OpenGL codegen to embed the shapes.

@netlify
Copy link

netlify bot commented Feb 15, 2022

✔️ Deploy Preview for docsite-preview ready!

🔨 Explore the source changes: 3b8eca1

🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/62138e2714a72c0008e8a390

😎 Browse the preview: https://deploy-preview-4284--docsite-preview.netlify.app

@turbo0628
Copy link
Member Author

/format

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.

Nice work!!

taichi/backends/opengl/codegen_opengl.cpp Outdated Show resolved Hide resolved
taichi/ir/statements.h Show resolved Hide resolved
taichi/backends/opengl/codegen_opengl.cpp Outdated Show resolved Hide resolved
taichi/backends/opengl/codegen_opengl.cpp Show resolved Hide resolved
taichi/ir/statements.cpp Outdated Show resolved Hide resolved
python/taichi/lang/kernel_arguments.py Show resolved Hide resolved
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! Only had a few nits and then it's good to go! :D

taichi/backends/opengl/codegen_opengl.cpp Outdated Show resolved Hide resolved
taichi/backends/opengl/codegen_opengl.cpp Outdated Show resolved Hide resolved
taichi/ir/frontend_ir.h Outdated Show resolved Hide resolved
taichi/ir/statements.h Outdated Show resolved Hide resolved
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.

LGTM!

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!!

@turbo0628 turbo0628 merged commit f2aaf7b into taichi-dev:master Feb 22, 2022
@turbo0628 turbo0628 deleted the element-shape branch February 22, 2022 02:12
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

4 participants