CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
185 stars 30 forks source link

Need runtime interface to query if queue uses immediate command list. #694

Closed Sarbojit2019 closed 6 months ago

Sarbojit2019 commented 10 months ago

oneAPI 2024.0.0 has changed the interface of make_queue() which is used for interop. New interface now takes isImmCmdList as one of the argument hence chipStar runtime has to have an interface to query the same info.

queue make_queue(const context &Context, const device &Device, pi_native_handle InteropHandle, bool IsImmCmdList, bool keep_ownership, const property_list &Properties);

chipStar can plan to implement get_native similar to SYCL which returns std::variant. Variant will be object of type ze_command_list_handle_t for ICL and ze_command_queue_handle_t otherwise.

For example: std::variant<ze_command_queue_handle_t, ze_command_list_handle_t> queue_var_handle = get_native(queue)

Sarbojit2019 commented 10 months ago

Above ask is to fix ticket : https://github.com/CHIP-SPV/H4I-MKLShim/issues/17.

pvelesko commented 6 months ago

Even when using ICL, we can still return the command queue. We can thus always set isImmCmdList = false which is what we do now and interop seems to work.

Please reopen the issue if there is a legitimate need to use ICL with interop.