Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[aot] Support multiple AOT runtime devices (#8275)
Issue: # ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 34529d5</samp> Add Vulkan device selection and error handling to C-API. This allows users to specify a `device_index` for the Vulkan backend in `taichi_core_impl.cpp`, and raises an exception for invalid indices for other backends. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 34529d5</samp> * Enable selecting a Vulkan device with the C-API by removing the zero check and calling `set_vulkan_device_index` with the device_index parameter ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbL249-R257)) * Add zero checks and error messages for the other backends that do not support selecting a device with the C-API: CUDA ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbR269)), Metal ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbR276)), OpenGL ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbR282)), CC ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbR288)), and LLVM ([link](https://github.com/taichi-dev/taichi/pull/8275/files?diff=unified&w=0#diff-693e7dacdac48ac69a749431b9e09ec9789a5aa2d4a98a4a3dad596c1fda6abbR296)) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information