adaptation_of_mlu_device_based_on_refactor_xccl_primitive#10647
Merged
fpzh2011 merged 7 commits intoJul 31, 2025
Conversation
…ve' of github.com:Oneflow-Inc/oneflow into adaptation_of_mlu_device_based_on_refactor_xccl_primitive
Contributor
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10647/ |
Contributor
Speed stats: |
Contributor
|
Code got formatted by CI. Please request CI again if you still want to have this PR merged. If the PR is from a forked repo, please download the patch files from the GitHub Actions web page and apply them locally. |
Flowingsun007
commented
Jul 1, 2025
| get_directory_property(EXISTING_DEFS COMPILE_DEFINITIONS) | ||
|
|
||
| if(NOT "WITH_DEVICES" IN_LIST EXISTING_DEFS) | ||
| add_definitions(-DWITH_DEVICES) |
Contributor
Author
There was a problem hiding this comment.
当编译npu/xpu/mlu等设备时,DEVICES_ENABLED即为True,会定义一一个WITH_DEVICES的宏表示多设备支持,后续在代码中方便统一管理。
// before:
#if defined(WITH_CUDA) || defined(WITH_NPU) || defined(WITH_MLU) || defined(WITH_XPU) ...
// after:
#if defined(WITH_CUDA) || defined(WITH_DEVICES)
Contributor
|
View latest API docs preview at: https://oneflow-staging.oss-cn-beijing.aliyuncs.com/docs/Oneflow-Inc/oneflow/pr/10647/ |
Contributor
Speed stats: |
fpzh2011
approved these changes
Jul 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.