Skip to content

Commit 36e59d9

Browse files
jushgpytorchmergebot
authored andcommitted
[c10d][nvshmem] fix missing override compilation error for nvshmem symmetric code (pytorch#159557)
Summary: Fix error when compiling nvshmem code section `NVSHMEMSymmetricMemory.cu` with BUCK ``` fbcode/caffe2/torch/csrc/distributed/c10d/symm_mem/NVSHMEMSymmetricMemory.cu:154:20: error: 'get_buffer' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override] 154 | virtual at::Tensor get_buffer(int | ^ fbcode/caffe2/torch/csrc/distributed/c10d/symm_mem/SymmetricMemory.hpp:56:20: note: overridden virtual function is here 56 | virtual at::Tensor get_buffer(int rank, c10::IntArrayRef sizes, c10::ScalarType dtype, int64_t storage_offset) = 0; ``` Test Plan: Build test + CI Rollback Plan: Differential Revision: D78813586 Pull Request resolved: pytorch#159557 Approved by: https://github.com/kwen2501
1 parent fc340d0 commit 36e59d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch/csrc/distributed/c10d/symm_mem/NVSHMEMSymmetricMemory.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class NVSHMEMSymmetricMemory : public SymmetricMemory {
155155
int rank,
156156
c10::IntArrayRef sizes,
157157
c10::ScalarType dtype,
158-
int64_t storage_offset) {
158+
int64_t storage_offset) override {
159159
// TODO: deduplicate
160160
const size_t numel = std::accumulate(
161161
sizes.begin(),

0 commit comments

Comments
 (0)