mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67624 Test Plan: Visual inspection. Sandcastle. Reviewed By: malfet Differential Revision: D31986628 fbshipit-source-id: c872bded7325997a2945dbf5d4d052628dcb3659
56 lines
1.1 KiB
C++
56 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "store_handler.h"
|
|
|
|
#include <caffe2/core/operator.h>
|
|
|
|
namespace caffe2 {
|
|
|
|
class StoreSetOp final : public Operator<CPUContext> {
|
|
public:
|
|
StoreSetOp(const OperatorDef& operator_def, Workspace* ws);
|
|
bool RunOnDevice() override;
|
|
|
|
private:
|
|
std::string blobName_;
|
|
|
|
INPUT_TAGS(HANDLER, DATA);
|
|
};
|
|
|
|
class StoreGetOp final : public Operator<CPUContext> {
|
|
public:
|
|
StoreGetOp(const OperatorDef& operator_def, Workspace* ws);
|
|
bool RunOnDevice() override;
|
|
|
|
private:
|
|
std::string blobName_;
|
|
|
|
INPUT_TAGS(HANDLER);
|
|
OUTPUT_TAGS(DATA);
|
|
};
|
|
|
|
class StoreAddOp final : public Operator<CPUContext> {
|
|
public:
|
|
StoreAddOp(const OperatorDef& operator_def, Workspace* ws);
|
|
bool RunOnDevice() override;
|
|
|
|
private:
|
|
std::string blobName_;
|
|
int addValue_;
|
|
|
|
INPUT_TAGS(HANDLER);
|
|
OUTPUT_TAGS(VALUE);
|
|
};
|
|
|
|
class StoreWaitOp final : public Operator<CPUContext> {
|
|
public:
|
|
StoreWaitOp(const OperatorDef& operator_def, Workspace* ws);
|
|
bool RunOnDevice() override;
|
|
|
|
private:
|
|
std::vector<std::string> blobNames_;
|
|
|
|
INPUT_TAGS(HANDLER);
|
|
};
|
|
} // namespace caffe2
|