Add support to enable the oneDNN backend for RISC-V#166602
Add support to enable the oneDNN backend for RISC-V#166602zhangfeiv0 wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/166602
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 01fe582 with merge base f4d05fe ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Performance improvements for enabling oneDNN backbend for RISC-VTest simple
|
|
@malfet can you review this when you have a moment?Thank you. |
|
@zhangfeiv0 , the RISC-V support is not only the operations supported by oneDNN. What does the approach to support RISV-V look like in your mind? If |
@EikanWang Thanks for the feedback! Let me clarify the approach: We propose adding RISC-V as a supported PyTorch CPU platform.RISC-V is a standard CPU architecture that should work with the existing CPU device type this PR is necessary, because:
Given this is a relatively straightforward enablement (adding RISC-V to the supported architectures list for oneDNN), I felt a direct PR was appropriate. However, if there are broader RISC-V support concerns, I'm happy to create an RFC for discussion. In addition, the Rise Project is actively promoting RVV optimizations for the Vec library and support for CI infrastructure, and related PRs will be submitted in the future. Please refer to the following links for more information. |
|
@pytorchbot merge -f "This is a no-op for CI right now" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
# Description Currently, oneDNN can be successfully compiled and run on RISC-V : [oneDNN riscv](uxlfoundation/oneDNN#2929) , and it has also introduced extensive RVV optimizations: [oneDNN/src/cpu/rv64](https://github.com/uxlfoundation/oneDNN/tree/main/src/cpu/rv64) . Therefore, this PR adds support for enabling the oneDNN backend on the RISC-V architecture. Although the current dependency package ideep uses a relatively lower version of oneDNN. and not yet sufficient for successful compilation, this is only a matter of time—once ideep is updated, compilation will work as expected. Below are my test results on RISC-V: ```bash $ uname -m riscv64 $ cat test.py import torch print(torch.backends.mkldnn.is_available()) $ python3 test.py True ``` Pull Request resolved: #166602 Approved by: https://github.com/malfet
Description
Currently, oneDNN can be successfully compiled and run on RISC-V : oneDNN riscv , and it has also introduced extensive RVV optimizations: oneDNN/src/cpu/rv64 . Therefore, this PR adds support for enabling the oneDNN backend on the RISC-V architecture. Although the current dependency package ideep uses a relatively lower version of oneDNN. and not yet sufficient for successful compilation, this is only a matter of time—once ideep is updated, compilation will work as expected.
Below are my test results on RISC-V:
$ uname -m riscv64 $ cat test.py import torch print(torch.backends.mkldnn.is_available()) $ python3 test.py Truecc @gujinghui @PenghuiCheng @XiaobingSuper @jianyuh @jgong5 @mingfeima @sanchitintel @ashokei @jingxu10 @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen @snadampal