mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Add API usage logging for several other RPC APIs. (#67722)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67722 ghstack-source-id: 142259452 Test Plan: waitforbuildbot Reviewed By: jaceyca, fduwjj Differential Revision: D32118872 fbshipit-source-id: 041ab5601221b1846c56ce4bb63364bec9ad28b0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5fd93fb5f8
commit
05e17e7ff6
@ -121,6 +121,7 @@ TypePtr tryInferTypeWithTypeHint(
|
||||
PyRRef::PyRRef(c10::intrusive_ptr<RRef> rref)
|
||||
: rref_(std::move(rref)), profilingFuture_(c10::nullopt) {
|
||||
TORCH_CHECK(rref_, "PyRRef must not wrap nullptr");
|
||||
C10_LOG_API_USAGE_ONCE("torch.distributed.rref");
|
||||
}
|
||||
|
||||
PyRRef::PyRRef(const py::object& value, const py::object& type_hint)
|
||||
@ -181,6 +182,7 @@ std::string PyRRef::ownerName() const {
|
||||
}
|
||||
|
||||
py::object PyRRef::toHere(const float timeoutSeconds) const {
|
||||
C10_LOG_API_USAGE_ONCE("torch.distributed.rref.to_here");
|
||||
if (rref_->isOwner()) {
|
||||
return localValue();
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user