Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NPU] Add pfn build log to pfn-related function #26772

Merged
merged 14 commits into from
Oct 23, 2024

Conversation

ShaojieZhuIntel
Copy link
Contributor

@ShaojieZhuIntel ShaojieZhuIntel commented Sep 25, 2024

Details:

There are many OPENVINO_THROW, OPENVINO_ASSERT inside https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp, call getLatestBuildError to show error info when pfn-related function is called and remove exception handle fuction that would never be called. Use a macro THROW_ON_FAIL_FOR_LEVELZERO_EXT to simplify exception handling code.
There are two functions zeroUtils::throwOnFail() in zero_utils.hpp, but only the two-parameters function zeroUtils::throwOnFail() is actually used. And zeroUtils::throwOnFail() will use its code location instead of the real location where issue happen, so use a macro THROW_ON_FAIL_FOR_LEVELZERO instead of the function zeroUtils::throwOnFail() with two parameters.
Function zeroUtils::throwOnFail() with three parameters is preserved.

Tickets:

@github-actions github-actions bot added category: build OpenVINO cmake script / infra category: NPU OpenVINO NPU plugin labels Sep 25, 2024
@github-actions github-actions bot removed the category: build OpenVINO cmake script / infra label Sep 25, 2024
@ShaojieZhuIntel ShaojieZhuIntel force-pushed the pfn_build_log branch 3 times, most recently from db7943b to f5b7f8f Compare October 17, 2024 02:31
@ShaojieZhuIntel ShaojieZhuIntel marked this pull request as ready for review October 17, 2024 06:35
@ShaojieZhuIntel ShaojieZhuIntel requested review from a team as code owners October 17, 2024 06:35
}
}

static inline void throwOnFail(const std::string& step, const ze_result_t result, const std::string& hintOnError) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed? Can we keep the same design for all 3 functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, This function is not actually used. It is not known whether it will be used in the future, so the original version is retained. I can change it to a macro definition if we need to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe we can remove the function because it is not actually used.

@PatrikStepan PatrikStepan added this pull request to the merge queue Oct 23, 2024
Merged via the queue into openvinotoolkit:master with commit 5e5c987 Oct 23, 2024
131 of 133 checks passed
DanLiu2Intel pushed a commit to DanLiu2Intel/openvino that referenced this pull request Nov 5, 2024
There are many OPENVINO_THROW, OPENVINO_ASSERT inside
https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp,
call getLatestBuildError to show error info when pfn-related function is
called and remove exception handle fuction that would never be called.
Use a macro THROW_ON_FAIL_FOR_LEVELZERO_EXT to simplify exception
handling code.
There are two functions zeroUtils::throwOnFail() in zero_utils.hpp, but
only the two-parameters function zeroUtils::throwOnFail() is actually
used. And zeroUtils::throwOnFail() will use its code location instead of
the real location where issue happen, so use a macro
THROW_ON_FAIL_FOR_LEVELZERO instead of the function
zeroUtils::throwOnFail() with two parameters.
Function zeroUtils::throwOnFail() with three parameters is preserved.

 - [EISW-139871](https://jira.devtools.intel.com/browse/EISW-139871)
CuriousPanCake pushed a commit to CuriousPanCake/openvino that referenced this pull request Nov 6, 2024
### Details:
There are many OPENVINO_THROW, OPENVINO_ASSERT inside
https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_npu/src/compiler/src/zero_compiler_in_driver.cpp,
call getLatestBuildError to show error info when pfn-related function is
called and remove exception handle fuction that would never be called.
Use a macro THROW_ON_FAIL_FOR_LEVELZERO_EXT to simplify exception
handling code.
There are two functions zeroUtils::throwOnFail() in zero_utils.hpp, but
only the two-parameters function zeroUtils::throwOnFail() is actually
used. And zeroUtils::throwOnFail() will use its code location instead of
the real location where issue happen, so use a macro
THROW_ON_FAIL_FOR_LEVELZERO instead of the function
zeroUtils::throwOnFail() with two parameters.
Function zeroUtils::throwOnFail() with three parameters is preserved.

### Tickets:
 - [EISW-139871](https://jira.devtools.intel.com/browse/EISW-139871)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: NPU OpenVINO NPU plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants