KhronosGroup / KhronosGroup/OpenCL-Docs
Allocating local mem in device functions is not explictly forbidden by the SPIR-V OpenCL Env
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
Currently it's possible to create a SPIR-V that allocates local mem in non-kernel functions although this is explicitly forbidden in OpenCL C spec for obvious implementation challenges. It is even accepted by various drivers (which likely just inline everything anyhow, effectively making the allocation happen inside the kernel).
Shall we add a check to the SPIR-V OpenCL Env for this case?
Contributor guide
Research direction
Start by reviewing the SPIR-V OpenCL Env specification and the OpenCL C restriction on local memory allocation in non-kernel functions. Determine where environment validity rules are defined; done means the environment explicitly forbids this allocation case and the relevant specification text is updated.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100