Python bindings: add_python_test(): do set HL_JIT_TARGET too#8156
Python bindings: add_python_test(): do set HL_JIT_TARGET too#8156steven-johnson merged 1 commit intohalide:mainfrom
add_python_test(): do set HL_JIT_TARGET too#8156Conversation
This one took quite a bit of digging. I wanted to enable opencl tests on debian package, and `boundary_conditions.py`+`division.py` were failing when run with `HL_TARGET=host OCL_ICD_VENDORS=no-opencl-please.missing` env variables with `clGetPlatformIDs failed`, which made no sense to me. Empty `HL_JIT_TARGET` results in `opencl` being detected, unsurprisingly.
That surprises me. Isn't a automatically constructed JIT target supposed to have no accelerators enabled? The source seems to confirm this. Lines 146 to 334 in f841a27 Together with the definition of Lines 645 to 665 in f841a27 It should just construct the default host (without accelerators). This leads me to believe that the |
|
Hmm, the C++ version of the tests does the same as your proposed patch: Halide/cmake/HalideTestHelpers.cmake Lines 68 to 72 in f841a27 |
|
@steven-johnson @alexreinking thanks. Question: is there any interest in adding a |
|
@LebedevRI we already test the apps in CI using Maybe I'm not understanding the key difference between what you're proposing and what we're doing? |
|
Yes, but not |
|
@LebedevRI - aha! I misunderstood you. I would welcome that contribution. I don't think we're testing JIT mode from the installed package at the moment. I just wonder how much practical benefit running all of them offers? What is the right balance and/or duplication between the build and package copies of the same tests in CI? Can we avoid affecting contributors' workflows at all? There might be something I'm not seeing, too 🙂 |
Aha.
I'm mainly just bothered that the whole halide needs to be reconfigured with different
Yeah, i would guess that only one of the ways should be used by the whatever wishes to run the tests.
|
This is a great point. |
This one took quite a bit of digging.
I wanted to enable opencl tests on debian package, and
boundary_conditions.py+division.pywere failing when run withHL_TARGET=host OCL_ICD_VENDORS=no-opencl-please.missingenv variables withclGetPlatformIDs failed, which made no sense to me.Empty
HL_JIT_TARGETresults inopenclbeing detected, unsurprisingly.