Commit 56c3672
committed
opencl: check that the compiler accepts the Adreno large-buffer option
Advertising cl_qcom_large_buffer and being able to build for it are different
questions. The Adreno 850 (compiler E17.51) reports the extension and then
rejects -qcom-enable-large-buffer with "invalid option", so every kernel build
fails and the process exits. Setting GGML_OPENCL_ADRENO_USE_LARGE_BUFFER=1
there does not cost throughput, it stops the backend working at all.
Build a trivial program once with the option and keep large-buffer mode only
if that succeeds, logging the downgrade so the fallback is visible. This sits
beside the existing check for whether the driver advertises the extension at
all, which has the same shape.
Costs one small program build, and only when the variable is set. On the 850,
test-backend-ops -o CPY with the variable set goes from a compile error and
exit 1 to 138/138 passing.1 parent 3f545be commit 56c3672
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5752 | 5752 | | |
5753 | 5753 | | |
5754 | 5754 | | |
| 5755 | + | |
| 5756 | + | |
| 5757 | + | |
| 5758 | + | |
| 5759 | + | |
| 5760 | + | |
| 5761 | + | |
| 5762 | + | |
| 5763 | + | |
| 5764 | + | |
| 5765 | + | |
| 5766 | + | |
| 5767 | + | |
| 5768 | + | |
| 5769 | + | |
5755 | 5770 | | |
5756 | 5771 | | |
5757 | 5772 | | |
| |||
5807 | 5822 | | |
5808 | 5823 | | |
5809 | 5824 | | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
5810 | 5829 | | |
5811 | 5830 | | |
5812 | 5831 | | |
| |||
0 commit comments