[Enhancement] Improve device handling in Cython kernel adapter (#220)
* [Enhancement] Improve device handling in Cython kernel adapter and wrapper - Updated `CythonKernelAdapter` to support dynamic device assignment based on target type (CUDA, HIP, or CPU). - Enhanced `CythonKernelWrapper` to include device management, ensuring tensors are allocated on the correct device. - Added error handling for unsupported target types to improve robustness. * [Enhancement] Add buffer device mapping in Cython kernel adapter and wrapper - Introduced `buffer_device_map` in `CythonKernelAdapter` to associate buffer variables with their respective devices. - Updated `CythonKernelWrapper` to utilize the new buffer device mapping for device checks during tensor allocation. - Enhanced error handling for device mismatches to ensure tensors are allocated on the correct device, improving robustness and flexibility in device management.
Showing
Please register or sign in to comment