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

include: Add missing DNNL_EXPERIMENTAL_UKERNEL ifdef #2211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgorny
Copy link

@mgorny mgorny commented Nov 8, 2024

Description

Add a missing #ifdef DNNL_EXPERIMENTAL_UKERNEL around dnnl_api_utils group. The templates inside that group reference dnnl_brgemm_t and dnnl_brgemm_pack_B_t types that are guarded using the same condition, and therefore attempting to include the file without the define results in errors:

/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:22: error: ‘dnnl_brgemm_t’ was not declared in this scope; did you mean ‘dnnl_stream_t’?
   38 | struct handle_traits<dnnl_brgemm_t> {
      |                      ^~~~~~~~~~~~~
      |                      dnnl_stream_t
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:35: error: template argument 1 is invalid
   38 | struct handle_traits<dnnl_brgemm_t> {
      |                                   ^
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:22: error: ‘dnnl_brgemm_pack_B_t’ was not declared in this scope
   45 | struct handle_traits<dnnl_brgemm_pack_B_t> {
      |                      ^~~~~~~~~~~~~~~~~~~~
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:42: error: template argument 1 is invalid
   45 | struct handle_traits<dnnl_brgemm_pack_B_t> {
      |                                          ^

Checklist

General

  • Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • Have you formatted the code using clang-format?

Performance improvements

  • Have you submitted performance data that demonstrates performance improvements?

New features

  • Have you published an RFC for the new feature?
  • Was the RFC approved?
  • Have you added relevant tests?

Bug fixes

  • Have you included information on how to reproduce the issue (either in a github issue or in this PR)?
  • Have you added relevant regression tests?

RFC PR

  • Does RFC document follow the template?
  • Have you added a link to the rendered document?

Add a missing `#ifdef DNNL_EXPERIMENTAL_UKERNEL` around `dnnl_api_utils`
group.  The templates inside that group reference `dnnl_brgemm_t`
and `dnnl_brgemm_pack_B_t` types that are guarded using the same
condition, and therefore attempting to include the file without the
define results in errors:

```
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:22: error: ‘dnnl_brgemm_t’ was not declared in this scope; did you mean ‘dnnl_stream_t’?
   38 | struct handle_traits<dnnl_brgemm_t> {
      |                      ^~~~~~~~~~~~~
      |                      dnnl_stream_t
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:38:35: error: template argument 1 is invalid
   38 | struct handle_traits<dnnl_brgemm_t> {
      |                                   ^
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:22: error: ‘dnnl_brgemm_pack_B_t’ was not declared in this scope
   45 | struct handle_traits<dnnl_brgemm_pack_B_t> {
      |                      ^~~~~~~~~~~~~~~~~~~~
/home/mgorny/miniforge3/envs/pytorch/include/oneapi/dnnl/dnnl_ukernel.hpp:45:42: error: template argument 1 is invalid
   45 | struct handle_traits<dnnl_brgemm_pack_B_t> {
      |                                          ^
```
@mgorny mgorny requested a review from a team as a code owner November 8, 2024 14:59
@vpirogov
Copy link
Member

make test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants