Commit 4d46cd3
committed
[UR][L0v2] Check for external memory mapping extension before use
urUSMHostAllocRegisterExp in the L0v2 adapter was unconditionally using
the ZE_extension_external_memmap_sysmem extension to register host
memory, causing zeMemAllocHost to return ZE_RESULT_ERROR_INVALID_ARGUMENT
on drivers that do not support this extension. This resulted in
UR_RESULT_ERROR_INVALID_VALUE being returned instead of the expected
UR_RESULT_ERROR_UNSUPPORTED_FEATURE.
Add a platform-level check for ZE_EXTERNAL_MEMORY_MAPPING_EXT_NAME
during driver extension enumeration, and return
UR_RESULT_ERROR_UNSUPPORTED_FEATURE early from urUSMHostAllocRegisterExp
when the extension is not available.
Update the conformance test to use UUR_ASSERT_SUCCESS_OR_UNSUPPORTED so
it gracefully skips when the driver does not support the extension,
rather than failing.
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>1 parent 46f2ff5 commit 4d46cd3
4 files changed
Lines changed: 11 additions & 1 deletion
File tree
- unified-runtime
- source/adapters/level_zero
- v2
- test/conformance/exp_usm_host_mem_register
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
850 | 854 | | |
851 | 855 | | |
852 | 856 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments