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

[Typo] replace rank to local_rank #3898

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions csrc/host_ir/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ HostIrEvaluator::HostIrEvaluator(
: container_(std::move(container)),
communicator_(communicator),
params_(params),
my_device_index_(communicator_ ? communicator_->deviceId() : 0) {
my_local_device_index_(communicator_ ? communicator_->local_rank() : 0) {
const DeviceIdxType device_index =
(communicator_ != nullptr && communicator_->is_available())
? communicator_->deviceId()
Expand Down Expand Up @@ -280,13 +280,13 @@ void HostIrEvaluator::handle(GetCurrentStream* get_current_stream) {
streams_.insert(
{get_current_stream->stream(),
c10::cuda::getCurrentCUDAStream(
static_cast<c10::DeviceIndex>(my_device_index_))});
static_cast<c10::DeviceIndex>(my_local_device_index_))});
}

void HostIrEvaluator::handle(Synchronize* synchronize) {
cudaStream_t current_stream =
c10::cuda::getCurrentCUDAStream(
static_cast<c10::DeviceIndex>(my_device_index_))
static_cast<c10::DeviceIndex>(my_local_device_index_))
.stream();
cudaStream_t stream_to_sync = getCUDAStream(synchronize->stream()).stream();

Expand Down
2 changes: 1 addition & 1 deletion csrc/host_ir/executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class HostIrEvaluator final : public OptOutDispatch {
using StreamKey = std::variant<int64_t, Stream*>;
std::unordered_map<StreamKey, c10::cuda::CUDAStream> streams_;
std::unordered_map<Expr*, c10::intrusive_ptr<c10d::Work>> works_;
const int64_t my_device_index_;
const int64_t my_local_device_index_;
};

} // namespace hir
Expand Down
Loading