/
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/alias_info.h
(2986B)
#pragma once #include <unordered_set> #include <vector> #include <ATen/core/interned_strings.h> #include <c10/util/Exception.h> namespace c10 { /** * class AliasInfo * * Data structure to hold aliasing information for an `Argument`. They can be * nested to represent aliasing information on contained types. * * There is a `beforeSet` which describes the aliasing information before the * operator executes, and an `afterSet` that describes aliasing info * after execution. */ class AliasInfo { public: // Symbol for the set that can alias anything static Symbol wildcardSet() { static const Symbol wc = Symbol::fromQualString("alias::*"); return wc; } void setIsWrite(bool isWrite) { isWrite_ = isWrite; } bool isWrite() const { return isWrite_; } void addBeforeSet(Symbol aliasSet) { beforeSets_.insert(aliasSet); } void addAfterSet(Symbol aliasSet) { afterSets_.insert(aliasSet); } const std::unordered_set<Symbol>& beforeSets() const { return beforeSets_; } const std::unordered_set<Symbol>& afterSets() const { return afterSets_; } Symbol beforeSet() const { AT_ASSERT(beforeSets_.size() == 1); return *beforeSets_.begin(); } bool isWildcardBefore() const { return beforeSets_.count(wildcardSet()) != 0; } bool isWildcardAfter() const { return afterSets_.count(wildcardSet()) != 0; } // the alias info for the contained types of the type // e.g. if this is an annotation on List[T], `sets` refers to // the alias sets that the list may be in // while containedTypes()[0] refers to the sets that members of the list // may be in void addContainedType(AliasInfo aliasInfo) { containedTypes_.push_back(std::move(aliasInfo)); } const std::vector<AliasInfo>& containedTypes() const { return containedTypes_; } private: std::unordered_set<Symbol> beforeSets_; std::unordered_set<Symbol> afterSets_; std::vector<AliasInfo> containedTypes_; bool isWrite_ = false; }; inline bool operator==(const AliasInfo& lhs, const AliasInfo& rhs) { return lhs.isWrite() == rhs.isWrite() && lhs.beforeSets() == rhs.beforeSets() && lhs.afterSets() == rhs.afterSets() && lhs.containedTypes() == rhs.containedTypes(); } // this does match the way things are represented in the schema inline std::ostream& operator<<(std::ostream& out, const AliasInfo& aliasInfo) { out << "("; bool first = true; for (const auto& set : aliasInfo.beforeSets()) { if (first) { first = false; } else { out << "|"; } out << set.toUnqualString(); } if (aliasInfo.isWrite()) { out << "!"; } if (aliasInfo.beforeSets() != aliasInfo.afterSets()) { out << " -> "; first = true; for (const auto& set : aliasInfo.afterSets()) { if (first) { first = false; } else { out << "|"; } out << set.toUnqualString(); } } out << ")"; return out; } } // namespace c10
Save
cmd:
run