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

[refactor] Implement CompiledKernelData::check() #7743

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

PGZXB
Copy link
Contributor

@PGZXB PGZXB commented Apr 5, 2023

Issue: #7002

Brief Summary

🤖 Generated by Copilot at 8d2c768

This pull request improves the error handling and debugging of the kernel compilation and caching process using the LLVM backend. It adds a check function to the CompiledKernelData class that verifies the LLVM module and tasks, and uses it to assert and report the status of the data.

Walkthrough

🤖 Generated by Copilot at 8d2c768

  • Add a new error enum value and message for the case when the CompiledKernelData is broken (link, link)
  • Implement a check function for the CompiledKernelData class that verifies the LLVM module and the tasks stored in the data using the LLVM verifier (link, link, link)
  • Add assertions and checks for the result of the check function after compiling or loading a kernel using the LLVM backend, and modify the debug message to include the cache filename (link, link)

@netlify
Copy link

netlify bot commented Apr 5, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit 8d2c768
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/642d5b711bd5c00008bfda31

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.

LGTM!

@PGZXB PGZXB merged commit 3d0a37a into taichi-dev:master Apr 6, 2023
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Issue: taichi-dev#7002 

### Brief Summary

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8d2c768</samp>

This pull request improves the error handling and debugging of the
kernel compilation and caching process using the LLVM backend. It adds a
`check` function to the `CompiledKernelData` class that verifies the
LLVM module and tasks, and uses it to assert and report the status of
the data.

### Walkthrough

<!--
copilot:walkthrough
-->
### <samp>🤖 Generated by Copilot at 8d2c768</samp>

* Add a new error enum value and message for the case when the
CompiledKernelData is broken
([link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-5e2472488f9620231c8e3d6a2c0413742e2b42424691991f4a85af81832af3f4R95),
[link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-70ec30330946b7543dcf0b458091cfc6128a5cb5460041db64144b84722de4abR184-R185))
* Implement a check function for the CompiledKernelData class that
verifies the LLVM module and the tasks stored in the data using the LLVM
verifier
([link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-3986d4b2137cab0463bb950113c0ddc44cfdf3baff237da6286c42c478309c3bR3),
[link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-3986d4b2137cab0463bb950113c0ddc44cfdf3baff237da6286c42c478309c3bR30-R43),
[link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-e54a1ed2c2d35f9357e4dfbbbc1224e70a95280b43d4a59f0017dc2c6163dca0R55-R56))
* Add assertions and checks for the result of the check function after
compiling or loading a kernel using the LLVM backend, and modify the
debug message to include the cache filename
([link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-b7662dbf5bcf20f4b99048f4f2405316c0ba037c0722273522efaad72d256ef0R178),
[link](https://github.com/taichi-dev/taichi/pull/7743/files?diff=unified&w=0#diff-b7662dbf5bcf20f4b99048f4f2405316c0ba037c0722273522efaad72d256ef0L266-R275))
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