llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[SPIR-V] Tracker for missing builtins in the SPIR-V backend

Open michalpaszkowski opened this issue 3 years ago • 2 comments
trafficstars

This issue and the following lists serves as a tracker for missing OpenCL/SPIR-V/... builtins discovered while testing the SPIR-V backend. The builtins will be incrementally implemented or fixed.

OpenCL:

  • [x] atomic_init()
  • [ ] atomic_flag_test_and_set
  • [ ] atomic_work_item_fence
  • [ ] mem_fence(unsigned int)
  • [ ] get_fence(void AS4*)
  • [ ] wait_group_events(int, ocl_event AS4*)
  • [ ] get_default_queue()
  • [x] get_image_num_mip_levels
  • [ ] get_image_channel_data_type

SPIR-V:

  • [ ] __spirv_Store(int*, int, int, int)
  • [ ] __to_global
  • [ ] __spirv_CreatePipeFromPipeStorage_write(__spirv_PipeStorage const AS1*)
  • [ ] __get_kernel_work_group_size_impl

michalpaszkowski avatar Sep 29 '22 19:09 michalpaszkowski

@llvm/issue-subscribers-opencl

llvmbot avatar Oct 10 '22 09:10 llvmbot

Patch implementing atomic_flag_test_and_set, atomic_flag_test_and_set_explicit, atomic_flag_clear, atomic_flag_clear_explicit:

michalpaszkowski avatar Oct 20 '22 01:10 michalpaszkowski

I'm still working on OpenCL's enqueue_kernel builtin function (it turns into the following calls in LLVM IR: __enqueue_kernel_basic, __enqueue_kernel_basic_events, __enqueue_kernel_events_varargs, __enqueue_kernel_varargs).

iliya-diyachkov avatar Oct 20 '22 18:10 iliya-diyachkov

OpenCL's enqueue_kernel builtin function was supported:

iliya-diyachkov avatar Oct 31 '22 23:10 iliya-diyachkov

Two SPIR-V's builtin function (__spirv_Load/__spirv_Store) were supported:

iliya-diyachkov avatar Dec 21 '22 19:12 iliya-diyachkov