mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
This PR fixes typos in comments and messages of `.cc` and `.h` files under `caffe2/operators` directory Pull Request resolved: https://github.com/pytorch/pytorch/pull/98235 Approved by: https://github.com/kit1980
31 lines
904 B
C++
31 lines
904 B
C++
#ifndef CAFFE2_OPERATORS_ASYNC_BARRIER_OP_H_
|
|
#define CAFFE2_OPERATORS_ASYNC_BARRIER_OP_H_
|
|
|
|
#include "caffe2/core/context.h"
|
|
#include "caffe2/core/export_caffe2_op_to_c10.h"
|
|
#include "caffe2/core/operator.h"
|
|
|
|
namespace caffe2 {
|
|
|
|
template <class Context>
|
|
class AsyncNetBarrierOp : public Operator<Context> {
|
|
public:
|
|
USE_OPERATOR_CONTEXT_FUNCTIONS;
|
|
USE_SIMPLE_CTOR_DTOR(AsyncNetBarrierOp)
|
|
|
|
bool RunOnDevice() override {
|
|
// This is a pretty much no-op operator, since it's only purposes is make
|
|
// sure that async_scheduling will schedule certain operations earlier than
|
|
// others.
|
|
//
|
|
// Exaple where this operator can work well - mixture of data-parallel and
|
|
// model parallel training, where one wants to force that all copies are
|
|
// started before data-parallel part starts.
|
|
return true;
|
|
}
|
|
};
|
|
|
|
} // namespace caffe2
|
|
|
|
#endif // CAFFE2_OPERATORS_ASYNC_BARRIER_OP_H_
|