forked from JuliaGPU/CUDA.jl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libcutensor_common.jl
141 lines (124 loc) · 3.49 KB
/
libcutensor_common.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
129
130
131
132
133
134
135
136
137
138
139
140
141
# Automatically generated using Clang.jl
const CUTENSOR_MAJOR = 1
const CUTENSOR_MINOR = 3
const CUTENSOR_PATCH = 0
@cenum cutensorOperator_t::UInt32 begin
CUTENSOR_OP_IDENTITY = 1
CUTENSOR_OP_SQRT = 2
CUTENSOR_OP_RELU = 8
CUTENSOR_OP_CONJ = 9
CUTENSOR_OP_RCP = 10
CUTENSOR_OP_SIGMOID = 11
CUTENSOR_OP_TANH = 12
CUTENSOR_OP_EXP = 22
CUTENSOR_OP_LOG = 23
CUTENSOR_OP_ABS = 24
CUTENSOR_OP_NEG = 25
CUTENSOR_OP_SIN = 26
CUTENSOR_OP_COS = 27
CUTENSOR_OP_TAN = 28
CUTENSOR_OP_SINH = 29
CUTENSOR_OP_COSH = 30
CUTENSOR_OP_ASIN = 31
CUTENSOR_OP_ACOS = 32
CUTENSOR_OP_ATAN = 33
CUTENSOR_OP_ASINH = 34
CUTENSOR_OP_ACOSH = 35
CUTENSOR_OP_ATANH = 36
CUTENSOR_OP_CEIL = 37
CUTENSOR_OP_FLOOR = 38
CUTENSOR_OP_ADD = 3
CUTENSOR_OP_MUL = 5
CUTENSOR_OP_MAX = 6
CUTENSOR_OP_MIN = 7
CUTENSOR_OP_UNKNOWN = 126
end
@cenum cutensorStatus_t::UInt32 begin
CUTENSOR_STATUS_SUCCESS = 0
CUTENSOR_STATUS_NOT_INITIALIZED = 1
CUTENSOR_STATUS_ALLOC_FAILED = 3
CUTENSOR_STATUS_INVALID_VALUE = 7
CUTENSOR_STATUS_ARCH_MISMATCH = 8
CUTENSOR_STATUS_MAPPING_ERROR = 11
CUTENSOR_STATUS_EXECUTION_FAILED = 13
CUTENSOR_STATUS_INTERNAL_ERROR = 14
CUTENSOR_STATUS_NOT_SUPPORTED = 15
CUTENSOR_STATUS_LICENSE_ERROR = 16
CUTENSOR_STATUS_CUBLAS_ERROR = 17
CUTENSOR_STATUS_CUDA_ERROR = 18
CUTENSOR_STATUS_INSUFFICIENT_WORKSPACE = 19
CUTENSOR_STATUS_INSUFFICIENT_DRIVER = 20
CUTENSOR_STATUS_IO_ERROR = 21
end
@cenum cutensorAlgo_t::Int32 begin
CUTENSOR_ALGO_GETT = -4
CUTENSOR_ALGO_TGETT = -3
CUTENSOR_ALGO_TTGT = -2
CUTENSOR_ALGO_DEFAULT = -1
end
@cenum cutensorWorksizePreference_t::UInt32 begin
CUTENSOR_WORKSPACE_MIN = 1
CUTENSOR_WORKSPACE_RECOMMENDED = 2
CUTENSOR_WORKSPACE_MAX = 3
end
@cenum cutensorComputeType_t::UInt32 begin
CUTENSOR_COMPUTE_16F = 1
CUTENSOR_COMPUTE_16BF = 1024
CUTENSOR_COMPUTE_TF32 = 4096
CUTENSOR_COMPUTE_32F = 4
CUTENSOR_COMPUTE_64F = 16
CUTENSOR_COMPUTE_8U = 64
CUTENSOR_COMPUTE_8I = 256
CUTENSOR_COMPUTE_32U = 128
CUTENSOR_COMPUTE_32I = 512
CUTENSOR_R_MIN_16F = 1
CUTENSOR_C_MIN_16F = 2
CUTENSOR_R_MIN_32F = 4
CUTENSOR_C_MIN_32F = 8
CUTENSOR_R_MIN_64F = 16
CUTENSOR_C_MIN_64F = 32
CUTENSOR_R_MIN_8U = 64
CUTENSOR_R_MIN_32U = 128
CUTENSOR_R_MIN_8I = 256
CUTENSOR_R_MIN_32I = 512
CUTENSOR_R_MIN_16BF = 1024
CUTENSOR_R_MIN_TF32 = 2048
CUTENSOR_C_MIN_TF32 = 4096
end
@cenum cutensorContractionDescriptorAttributes_t::UInt32 begin
CUTENSOR_CONTRACTION_DESCRIPTOR_TAG = 0
end
@cenum cutensorContractionFindAttributes_t::UInt32 begin
CUTENSOR_CONTRACTION_FIND_AUTOTUNE_MODE = 0
CUTENSOR_CONTRACTION_FIND_CACHE_MODE = 1
CUTENSOR_CONTRACTION_FIND_INCREMENTAL_COUNT = 2
end
@cenum cutensorAutotuneMode_t::UInt32 begin
CUTENSOR_AUTOTUNE_NONE = 0
CUTENSOR_AUTOTUNE_INCREMENTAL = 1
end
@cenum cutensorCacheMode_t::UInt32 begin
CUTENSOR_CACHE_MODE_NONE = 0
CUTENSOR_CACHE_MODE_PEDANTIC = 1
end
struct cutensorHandle_t
fields::NTuple{512, Int64}
end
struct cutensorPlanCacheline_t
fields::NTuple{1408, Int64}
end
struct cutensorPlanCache_t
fields::NTuple{12288, Int64}
end
struct cutensorTensorDescriptor_t
fields::NTuple{72, Int64}
end
struct cutensorContractionDescriptor_t
fields::NTuple{288, Int64}
end
struct cutensorContractionPlan_t
fields::NTuple{1408, Int64}
end
struct cutensorContractionFind_t
fields::NTuple{64, Int64}
end