mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[5/N] Fix extra warnings brought by clang-tidy-17 (#138403)
Follows #137983 Pull Request resolved: https://github.com/pytorch/pytorch/pull/138403 Approved by: https://github.com/ezyang
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@ -110,7 +111,7 @@ class WaitCounterImpl {
|
||||
return ctxs;
|
||||
}
|
||||
|
||||
void stop(SmallVector<intptr_t>&& ctxs) noexcept {
|
||||
void stop(const SmallVector<intptr_t>& ctxs) noexcept {
|
||||
auto now = std::chrono::steady_clock::now();
|
||||
assert(ctxs.size() == backends_.size());
|
||||
for (size_t i = 0; i < ctxs.size(); ++i) {
|
||||
@ -155,7 +156,7 @@ WaitCounterHandle::WaitGuard WaitCounterHandle::start() {
|
||||
return WaitCounterHandle::WaitGuard(*this, impl_.start());
|
||||
}
|
||||
|
||||
void WaitCounterHandle::stop(SmallVector<intptr_t>&& ctxs) {
|
||||
return impl_.stop(std::move(ctxs));
|
||||
void WaitCounterHandle::stop(const SmallVector<intptr_t>& ctxs) {
|
||||
return impl_.stop(ctxs);
|
||||
}
|
||||
} // namespace c10::monitor
|
||||
|
Reference in New Issue
Block a user