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

Understand oneDNN graph compiler #1797

Closed
akote123 opened this issue Feb 5, 2024 · 7 comments
Closed

Understand oneDNN graph compiler #1797

akote123 opened this issue Feb 5, 2024 · 7 comments
Assignees
Labels

Comments

@akote123
Copy link

akote123 commented Feb 5, 2024

Hi,
I wanted to understand from framework like Tensorflow or Pytorch how we can enable graph compiler.

cc:@ZhennanQin

Thank you

@ZhennanQin
Copy link
Contributor

Hi Aruna,

The framework integration is WIP, you may check the status from framework RFC. Currently, the recommended way to try graph compiler with pytorch, is to use IPEX. Graph compiler is enabled by default in its INT8 path, for other data types like float32 or bfloat16, you need to manually turn on oneDNN graph by inserting the below line in the beginning of your model script:

ipex._C.set_llga_fp32_bf16_enabled(True)

@akote123
Copy link
Author

akote123 commented Feb 6, 2024

@ZhennanQin Thank you

@akote123 akote123 closed this as completed Feb 6, 2024
@akote123
Copy link
Author

akote123 commented Feb 6, 2024

@ZhennanQin , I was going through the https://arxiv.org/abs/2301.01333, after TensorIR how it calls batch reduce kernel and also I want understand where exactly the microkernel file location in oneDNN repository.

@ZhennanQin
Copy link
Contributor

@akote123
Copy link
Author

akote123 commented Feb 6, 2024

@ZhennanQin ,Graph compiler calls microkernel from primitive APIs?
How Tensor IR is connected to this?

@ZhennanQin
Copy link
Contributor

Graph compiler shares the same microkernel implementation with primitive. The brgemm abstraction in graph compiler can be found at: https://github.com/oneapi-src/oneDNN/blob/main/src/graph/backend/graph_compiler/core/src/runtime/microkernel/cpu/microkernel.hpp

@akote123
Copy link
Author

akote123 commented Feb 6, 2024

@ZhennanQin , Thank you.

@akote123 akote123 reopened this Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants