Skip to content

Commit

Permalink
Clarify that warnings are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomestre committed Nov 28, 2023
1 parent 8c798b2 commit 64765ea
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@ urAdapterRetain(
/// represents a warning instead. This means that the entry-point call did not
/// fail. However it might not have behaved as expected.
///
/// * Using ::UR_RESULT_ERROR_ADAPTER_SPECIFIC to emit warnings is an optional
/// feature. Its usage is left at the discretion of adapter maintainers.
///
/// * Implementations *must* store the message and error code in thread-local
/// storage prior to returning ::UR_RESULT_ERROR_ADAPTER_SPECIFIC.
///
Expand Down
3 changes: 3 additions & 0 deletions scripts/core/adapter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ details: |
* If `pError` is $X_RESULT_SUCCESS, $X_RESULT_ERROR_ADAPTER_SPECIFIC
represents a warning instead. This means that the entry-point call did not
fail. However it might not have behaved as expected.
* Using $X_RESULT_ERROR_ADAPTER_SPECIFIC to emit warnings is an optional
feature. Its usage is left at the discretion of adapter maintainers.
* Implementations *must* store the message and error code in thread-local
storage prior to returning $X_RESULT_ERROR_ADAPTER_SPECIFIC.
Expand Down
3 changes: 3 additions & 0 deletions source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ ur_result_t UR_APICALL urAdapterRetain(
/// represents a warning instead. This means that the entry-point call did not
/// fail. However it might not have behaved as expected.
///
/// * Using ::UR_RESULT_ERROR_ADAPTER_SPECIFIC to emit warnings is an optional
/// feature. Its usage is left at the discretion of adapter maintainers.
///
/// * Implementations *must* store the message and error code in thread-local
/// storage prior to returning ::UR_RESULT_ERROR_ADAPTER_SPECIFIC.
///
Expand Down
3 changes: 3 additions & 0 deletions source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ ur_result_t UR_APICALL urAdapterRetain(
/// represents a warning instead. This means that the entry-point call did not
/// fail. However it might not have behaved as expected.
///
/// * Using ::UR_RESULT_ERROR_ADAPTER_SPECIFIC to emit warnings is an optional
/// feature. Its usage is left at the discretion of adapter maintainers.
///
/// * Implementations *must* store the message and error code in thread-local
/// storage prior to returning ::UR_RESULT_ERROR_ADAPTER_SPECIFIC.
///
Expand Down

0 comments on commit 64765ea

Please sign in to comment.