summaryrefslogtreecommitdiff
path: root/aten
diff options
context:
space:
mode:
Diffstat (limited to 'aten')
-rw-r--r--aten/src/ATen/core/interned_strings.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/aten/src/ATen/core/interned_strings.h b/aten/src/ATen/core/interned_strings.h
index dd0fd18b34..7e3e8ea95a 100644
--- a/aten/src/ATen/core/interned_strings.h
+++ b/aten/src/ATen/core/interned_strings.h
@@ -18,6 +18,7 @@ namespace c10 {
_(namespaces, attr) \
_(namespaces, scope) \
_(namespaces, user) \
+ _(namespaces, _caffe2) \
_(namespaces, namespaces) \
_(prim, Assign) \
_(prim, BroadcastingChunk) \
@@ -188,6 +189,7 @@ namespace c10 {
_(namespaces, attr) \
_(namespaces, scope) \
_(namespaces, user) \
+ _(namespaces, _caffe2) \
_(namespaces, namespaces)
#endif
@@ -255,6 +257,7 @@ struct CAFFE2_API Symbol {
static Symbol onnx(const std::string & s);
static Symbol prim(const std::string & s);
static Symbol user(const std::string & s);
+ static Symbol caffe2(const std::string & s);
// TODO: eliminate me
static Symbol scope(const std::string & s);
@@ -263,6 +266,7 @@ struct CAFFE2_API Symbol {
bool is_prim() const;
bool is_onnx() const;
bool is_user() const;
+ bool is_caffe2() const;
// So we can switch on this
constexpr operator unique_t() const {
@@ -322,11 +326,13 @@ inline Symbol Symbol::onnx(const std::string & s) { return Symbol::fromQualStri
inline Symbol Symbol::prim(const std::string & s) { return Symbol::fromQualString("prim::" + s); }
inline Symbol Symbol::scope(const std::string & s) { return Symbol::fromQualString("scope::" + s); }
inline Symbol Symbol::user(const std::string & s) { return Symbol::fromQualString("user::" + s); }
+inline Symbol Symbol::caffe2(const std::string & s) { return Symbol::fromQualString("_caffe2::" + s); }
inline bool Symbol::is_attr() const { return ns() == namespaces::attr; }
inline bool Symbol::is_aten() const { return ns() == namespaces::aten; }
inline bool Symbol::is_prim() const { return ns() == namespaces::prim; }
inline bool Symbol::is_onnx() const { return ns() == namespaces::onnx; }
inline bool Symbol::is_user() const { return ns() == namespaces::user; }
+inline bool Symbol::is_caffe2() const { return ns() == namespaces::_caffe2; }
} // namespace c10