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.
问题描述:
import oneflow时会创建一些全局对象,其中下面段落创建了
NewCclCommMgr
对象。https://github.com/Oneflow-Inc/oneflow/blob/master/oneflow/core/job/env_global_objects_scope.cpp#L200-L208
不过当使用非CUDA设备时,无法创建
NewCclCommMgr
对象,在runtime阶段带来一些问题。这里的改动,就是在runtime阶段也尝试创建
NewCclCommMgr
对象。注:
NewCclCommMgr
对象的创建,依赖RegisterEagerCclCommMgrType
没有解决的问题:在runtime之前,
NewCclCommMgr
对象仅仅用于InsertNcclLogicalOpPass
,我觉得,并不是必须的,或许就可以把NewCclCommMgr对象的创建放到后面,不过涉及的范围比较大,怕有其他副作用。