oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
208 stars 90 forks source link

ZE_RESULT_ERROR_UNSUPPORTED_FEATURE when running zeDeviceGetStatus #102

Open jjfumero opened 1 year ago

jjfumero commented 1 year ago

Running the function zeDeviceGetStatus produces the error code 78000003, which is ZE_RESULT_ERROR_UNSUPPORTED_FEATURE.

    result = zeDeviceGetStatus(device);
    if (result != ZE_RESULT_SUCCESS) {
        std::cout << "[JNI] Error in zeDeviceGetStatus with code: " << std::hex << result << std::dec << std::endl;
        if (result == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
            std::cout << "[JNI] Error ZE_RESULT_ERROR_UNSUPPORTED_FEATURE " << std::endl;
        }
    }

Output of this snippet:

[JNI] Error in zeDeviceGetStatus with code: 78000003
[JNI] Error ZE_RESULT_ERROR_UNSUPPORTED_FEATURE 

However, following the Level Zero SPEC, https://spec.oneapi.io/level-zero/latest/core/api.html?highlight=zedevicegetstatus#zedevicegetstatus, this function does not return such as error code.

Does this function need hardware support? Is this an error in the implementation?

Some context:

jandres742 commented 1 year ago

hi @jjfumero . UNSUPPORTED_FEATURE is a generic error code we return to indicate feature has not been implemented by the L0 driver, because of either SW or HW support, or something else. In this case, L0 GPU driver is returning that, indicating it hasn't been implemented.

We can update the spec with that error code to make it clearer.

eero-t commented 1 year ago

Spec could have some common "Return error values" section which would list error values that could be returned from functions. Documentation for individual functions could then just link the common error section, and document exceptions to that.

eero-t commented 10 months ago

We can update the spec with that error code to make it clearer.

Spec could have some common "Return error values" section which would list error values that could be returned from functions. Documentation for individual functions could then just link the common error section, and document exceptions to that.

@jandres742 Was either of those done?

Or should @jjfumero file such bug against the spec project (before closing this): https://github.com/oneapi-src/level-zero-spec/issues