/
usr
/
local
/
lib64
/
python3.6
/
site-packages
/
torch
/
include
/
ATen
/
core
/
/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core
mkdir
upload
Name
Size
Mode
Actions
boxing/
-
0755
rm
dispatch/
-
0755
rm
op_registration/
-
0755
rm
alias_info.h
2986
0644
edit
dl
rm
Array.h
768
0644
edit
dl
rm
ATenGeneral.h
45
0644
edit
dl
rm
ATenOpList.h
246
0644
edit
dl
rm
aten_interned_strings.h
25389
0644
edit
dl
rm
Backtrace.h
59
0644
edit
dl
rm
blob.h
5422
0644
edit
dl
rm
builtin_function.h
3649
0644
edit
dl
rm
DeprecatedTypeProperties.h
3773
0644
edit
dl
rm
DeprecatedTypePropertiesRegistry.h
795
0644
edit
dl
rm
Dict.h
13195
0644
edit
dl
rm
Dict_inl.h
7996
0644
edit
dl
rm
Dimname.h
1188
0644
edit
dl
rm
DimVector.h
247
0644
edit
dl
rm
DistributionsHelper.h
12594
0644
edit
dl
rm
Formatting.h
959
0644
edit
dl
rm
function.h
2145
0644
edit
dl
rm
functional.h
1460
0644
edit
dl
rm
function_schema.h
13577
0644
edit
dl
rm
function_schema_inl.h
9319
0644
edit
dl
rm
Generator.h
4935
0644
edit
dl
rm
grad_mode.h
210
0644
edit
dl
rm
interned_strings.h
25332
0644
edit
dl
rm
interned_strings_class.h
770
0644
edit
dl
rm
ivalue.h
38823
0644
edit
dl
rm
ivalue_inl.h
59963
0644
edit
dl
rm
ivalue_to.h
756
0644
edit
dl
rm
jit_type.h
75971
0644
edit
dl
rm
jit_type_base.h
6508
0644
edit
dl
rm
LegacyTypeDispatch.h
4626
0644
edit
dl
rm
List.h
15667
0644
edit
dl
rm
List_inl.h
11012
0644
edit
dl
rm
Macros.h
44
0644
edit
dl
rm
MT19937RNGEngine.h
6410
0644
edit
dl
rm
NamedTensor.h
5050
0644
edit
dl
rm
operator_name.h
3018
0644
edit
dl
rm
PhiloxRNGEngine.h
6496
0644
edit
dl
rm
PythonModeTLS.h
403
0644
edit
dl
rm
qualified_name.h
4358
0644
edit
dl
rm
QuantizerBase.h
2443
0644
edit
dl
rm
Range.h
418
0644
edit
dl
rm
Reduction.h
461
0644
edit
dl
rm
rref_interface.h
1144
0644
edit
dl
rm
Scalar.h
29
0644
edit
dl
rm
ScalarType.h
33
0644
edit
dl
rm
stack.h
6034
0644
edit
dl
rm
Tensor.h
1756
0644
edit
dl
rm
TensorAccessor.h
10296
0644
edit
dl
rm
TensorBase.h
32767
0644
edit
dl
rm
TensorBody.h
247555
0644
edit
dl
rm
TransformationHelper.h
6911
0644
edit
dl
rm
typeid.h
29
0644
edit
dl
rm
UndefinedTensorImpl.h
42
0644
edit
dl
rm
UnsafeFromTH.h
708
0644
edit
dl
rm
VariableHooksInterface.h
3312
0644
edit
dl
rm
Variadic.h
2257
0644
edit
dl
rm
Vitals.h
2305
0644
edit
dl
rm
Edit:
/usr/local/lib64/python3.6/site-packages/torch/include/ATen/core/operator_name.h
(3018B)
#pragma once #include <c10/macros/Macros.h> #include <c10/util/Exception.h> #include <c10/util/Optional.h> #include <c10/util/string_view.h> #include <string> #include <utility> #include <ostream> 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<c10::string_view> 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<std::string>()(x.name) ^ (~ std::hash<std::string>()(x.overload_name)); } }; }
Save
cmd:
run