inducer / inducer/pyopencl

feat: support offline compilers

Open
#313 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
247
Avg merge
7h 2m
Merged PRs (30d)
6

Description

For some devices, online compilers might not be available. For the code written in C/C++ invoking OpenCL library, they will choose to call `clCreateProgramWithBinary` instead of `clCreateProgramWithSource`, so that the subsequent `build` method will not try to find a compiler for compiling. However, in the case of PyOpenCL, it provides encapsulation that it tries to make all these transparent, so like the case of #312, the unavailability of online compiler makes the PyOpenCL library unusable. Therefore, it would be great if there can add support for offline compilers.

One way to do it is to modify https://github.com/inducer/pyopencl/blob/4bfb2d65d31c8132de46bbb007cfebd3b934328d/src/wrap_cl.hpp#L3977 , so that, we can make it compile the source using the specified offline compiler, then feed the binary to the OpenCL. But, this only happens when we set certain flags to indicate offline compilers should be used.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.