/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core
NameSizeModeActions
boxing/-0755rm
dispatch/-0755rm
op_registration/-0755rm
alias_info.h29860644editdlrm
Array.h7680644editdlrm
ATenGeneral.h450644editdlrm
ATenOpList.h2460644editdlrm
aten_interned_strings.h253890644editdlrm
Backtrace.h590644editdlrm
blob.h54220644editdlrm
builtin_function.h36490644editdlrm
DeprecatedTypeProperties.h37730644editdlrm
DeprecatedTypePropertiesRegistry.h7950644editdlrm
Dict.h131950644editdlrm
Dict_inl.h79960644editdlrm
Dimname.h11880644editdlrm
DimVector.h2470644editdlrm
DistributionsHelper.h125940644editdlrm
Formatting.h9590644editdlrm
function.h21450644editdlrm
functional.h14600644editdlrm
function_schema.h135770644editdlrm
function_schema_inl.h93190644editdlrm
Generator.h49350644editdlrm
grad_mode.h2100644editdlrm
interned_strings.h253320644editdlrm
interned_strings_class.h7700644editdlrm
ivalue.h388230644editdlrm
ivalue_inl.h599630644editdlrm
ivalue_to.h7560644editdlrm
jit_type.h759710644editdlrm
jit_type_base.h65080644editdlrm
LegacyTypeDispatch.h46260644editdlrm
List.h156670644editdlrm
List_inl.h110120644editdlrm
Macros.h440644editdlrm
MT19937RNGEngine.h64100644editdlrm
NamedTensor.h50500644editdlrm
operator_name.h30180644editdlrm
PhiloxRNGEngine.h64960644editdlrm
PythonModeTLS.h4030644editdlrm
qualified_name.h43580644editdlrm
QuantizerBase.h24430644editdlrm
Range.h4180644editdlrm
Reduction.h4610644editdlrm
rref_interface.h11440644editdlrm
Scalar.h290644editdlrm
ScalarType.h330644editdlrm
stack.h60340644editdlrm
Tensor.h17560644editdlrm
TensorAccessor.h102960644editdlrm
TensorBase.h327670644editdlrm
TensorBody.h2475550644editdlrm
TransformationHelper.h69110644editdlrm
typeid.h290644editdlrm
UndefinedTensorImpl.h420644editdlrm
UnsafeFromTH.h7080644editdlrm
VariableHooksInterface.h33120644editdlrm
Variadic.h22570644editdlrm
Vitals.h23050644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/operator_name.h (3018B)
#pragma once #include #include #include #include #include #include #include namespace c10 { // TODO: consider storing namespace separately too struct OperatorName final { std::string name; std::string overload_name; OperatorName(std::string name, std::string overload_name) : name(std::move(name)), overload_name(std::move(overload_name)) {} // TODO: These two functions below are slow! Fix internal data structures so // I don't have to manually reconstruct the namespaces! // Return the namespace of this OperatorName, if it exists. The // returned string_view is only live as long as the OperatorName // exists and name is not mutated c10::optional getNamespace() const { auto pos = name.find("::"); if (pos == std::string::npos) { return c10::nullopt; } else { return c10::make_optional(c10::string_view(name.data(), pos)); } } // Returns true if we successfully set the namespace bool setNamespaceIfNotSet(const char* ns) { if (!getNamespace().has_value()) { const auto ns_len = strlen(ns); const auto old_name_size = name.size(); name.resize(ns_len + 2 + old_name_size); // Shift current value of name to the end of the new space. name.replace(name.size() - old_name_size, old_name_size, name, 0, old_name_size); name.replace(0, ns_len, ns, ns_len); name[ns_len] = ':'; name[ns_len + 1] = ':'; return true; } else { return false; } } }; // Non-owning view of an OperatorName. Unlike OperatorName, most of // its functions are constexpr, so it can be used for compile time // computations struct OperatorNameView final { c10::string_view name; c10::string_view overload_name; constexpr OperatorNameView(c10::string_view name, c10::string_view overload_name) : name(name), overload_name(overload_name) {} // Parses strings like "foo.overload" and also "foo" constexpr static OperatorNameView parse(c10::string_view full_name) { auto i = full_name.find('.'); if (i == c10::string_view::npos) { return OperatorNameView(full_name, c10::string_view()); } else { return OperatorNameView(full_name.substr(0, i), full_name.substr(i + 1)); } } }; inline bool operator==(const OperatorName& lhs, const OperatorName& rhs) { return lhs.name == rhs.name && lhs.overload_name == rhs.overload_name; } inline bool operator!=(const OperatorName& lhs, const OperatorName& rhs) { return !operator==(lhs, rhs); } TORCH_API std::string toString(const OperatorName& opName); TORCH_API std::ostream& operator<<(std::ostream&, const OperatorName&); } // namespace c10 namespace std { template <> struct hash<::c10::OperatorName> { size_t operator()(const ::c10::OperatorName& x) const { return std::hash()(x.name) ^ (~ std::hash()(x.overload_name)); } }; }