forked from ITensor/ITensors.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimports.jl
128 lines (117 loc) · 2.17 KB
/
imports.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Makes `cpu` available as `NDTensors.cpu`.
# TODO: Define `cpu`, `cu`, etc. in a module `DeviceAbstractions`,
# similar to:
# https://github.com/JuliaGPU/KernelAbstractions.jl
# https://github.com/oschulz/HeterogeneousComputing.jl
using Adapt
using Base.Threads
using Compat
using Dictionaries
using Folds
using InlineStrings
using Random
using LinearAlgebra
using StaticArrays
using Functors
using SimpleTraits
using SplitApplyCombine
using Strided
using TimerOutputs
using TupleTools
for lib in [
:AllocateData,
:BackendSelection,
:BaseExtensions,
:UnspecifiedTypes,
:TypeParameterAccessors,
:Expose,
:GPUArraysCoreExtensions,
:AMDGPUExtensions,
:CUDAExtensions,
:MetalExtensions,
:BroadcastMapConversion,
:RankFactorization,
:LabelledNumbers,
:GradedAxes,
:SymmetrySectors,
:TensorAlgebra,
:SparseArrayInterface,
:SparseArrayDOKs,
:DiagonalArrays,
:BlockSparseArrays,
:NamedDimsArrays,
:SmallVectors,
:SortedSets,
:TagSets,
:UnallocatedArrays,
]
include("lib/$(lib)/src/$(lib).jl")
@eval using .$lib: $lib
end
# TODO: This is defined for backwards compatibility,
# delete this alias once downstream packages change over
# to using `BackendSelection`.
const AlgorithmSelection = BackendSelection
using Base: @propagate_inbounds, ReshapedArray, DimOrInd, OneTo
using Base.Cartesian: @nexprs
using Base.Threads: @spawn
using .AMDGPUExtensions: roc
using .CUDAExtensions: cu
using .GPUArraysCoreExtensions: cpu
using .MetalExtensions: mtl
import Base:
# Types
AbstractFloat,
Array,
CartesianIndex,
Complex,
IndexStyle,
Tuple,
# Symbols
+,
-,
*,
/,
# Methods
checkbounds,
complex,
convert,
conj,
copy,
copyto!,
eachindex,
eltype,
empty,
fill,
fill!,
getindex,
hash,
imag,
isempty,
isless,
iterate,
length,
map,
permutedims,
permutedims!,
print,
promote_rule,
randn,
real,
reshape,
setindex,
setindex!,
show,
size,
stride,
strides,
summary,
to_indices,
unsafe_convert,
view,
zero,
zeros
import Base.Broadcast: Broadcasted, BroadcastStyle
import Adapt: adapt_structure, adapt_storage
import LinearAlgebra: diag, exp, norm, qr, svd, mul!
import TupleTools: isperm