Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[refactor] Implement CompiledKernelData::check() (taichi-dev#7743)
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))
- Loading branch information