Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
4220eebf
Commit
4220eebf
authored
May 07, 2019
by
Shucai Xiao
Browse files
merge changes from develop branch
parents
2e175fd8
767ca0cc
Changes
38
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
142 additions
and
12 deletions
+142
-12
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/lrn.hpp
src/targets/gpu/include/migraphx/gpu/lrn.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/miopen.hpp
src/targets/gpu/include/migraphx/gpu/miopen.hpp
+32
-0
src/targets/gpu/include/migraphx/gpu/pad.hpp
src/targets/gpu/include/migraphx/gpu/pad.hpp
+6
-0
src/targets/gpu/include/migraphx/gpu/pooling.hpp
src/targets/gpu/include/migraphx/gpu/pooling.hpp
+6
-0
src/targets/gpu/include/migraphx/gpu/quant_convolution.hpp
src/targets/gpu/include/migraphx/gpu/quant_convolution.hpp
+1
-1
src/targets/gpu/include/migraphx/gpu/quant_gemm.hpp
src/targets/gpu/include/migraphx/gpu/quant_gemm.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/relu.hpp
src/targets/gpu/include/migraphx/gpu/relu.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/softmax.hpp
src/targets/gpu/include/migraphx/gpu/softmax.hpp
+7
-0
src/targets/gpu/include/migraphx/gpu/tanh.hpp
src/targets/gpu/include/migraphx/gpu/tanh.hpp
+7
-0
src/targets/gpu/write_literals.cpp
src/targets/gpu/write_literals.cpp
+7
-0
test/eliminate_allocation_test.cpp
test/eliminate_allocation_test.cpp
+7
-0
test/eliminate_concat_test.cpp
test/eliminate_concat_test.cpp
+14
-0
test/gpu/adjust_allocation.cpp
test/gpu/adjust_allocation.cpp
+1
-1
test/memory_coloring_test.cpp
test/memory_coloring_test.cpp
+7
-0
test/print_graph_test.cpp
test/print_graph_test.cpp
+6
-6
tools/include/operation.hpp
tools/include/operation.hpp
+6
-4
No files found.
src/targets/gpu/include/migraphx/gpu/logsoftmax.hpp
View file @
4220eebf
...
@@ -25,6 +25,13 @@ namespace gpu {
...
@@ -25,6 +25,13 @@ namespace gpu {
struct
hip_logsoftmax
struct
hip_logsoftmax
{
{
op
::
logsoftmax
op
;
op
::
logsoftmax
op
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"gpu::logsoftmax"
;
}
std
::
string
name
()
const
{
return
"gpu::logsoftmax"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/lrn.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_lrn
struct
miopen_lrn
{
{
shared
<
lrn_descriptor
>
ldesc
;
shared
<
lrn_descriptor
>
ldesc
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
gpu
::
reflect
(
self
.
ldesc
.
get
(),
f
);
}
std
::
string
name
()
const
{
return
"gpu::lrn"
;
}
std
::
string
name
()
const
{
return
"gpu::lrn"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/miopen.hpp
View file @
4220eebf
...
@@ -165,6 +165,38 @@ inline fused_operator_args make_fused_args()
...
@@ -165,6 +165,38 @@ inline fused_operator_args make_fused_args()
return
make_obj
<
fused_operator_args
>
(
&
miopenCreateOperatorArgs
);
return
make_obj
<
fused_operator_args
>
(
&
miopenCreateOperatorArgs
);
}
}
template
<
class
F
>
auto
reflect
(
miopenActivationDescriptor_t
ad
,
F
f
)
{
assert
(
ad
!=
nullptr
);
miopenActivationMode_t
mode
=
miopenActivationPASTHRU
;
double
alpha
=
0.0
;
double
beta
=
0.0
;
double
gamma
=
0.0
;
miopenGetActivationDescriptor
(
ad
,
&
mode
,
&
alpha
,
&
beta
,
&
gamma
);
return
pack
(
f
(
std
::
move
(
mode
),
"mode"
),
// NOLINT
f
(
std
::
move
(
alpha
),
"alpha"
),
// NOLINT
f
(
std
::
move
(
beta
),
"beta"
),
// NOLINT
f
(
std
::
move
(
gamma
),
"gamma"
));
// NOLINT
}
template
<
class
F
>
auto
reflect
(
miopenLRNDescriptor_t
lrnd
,
F
f
)
{
assert
(
lrnd
!=
nullptr
);
miopenLRNMode_t
mode
=
miopenLRNWithinChannel
;
unsigned
int
n
=
0
;
double
alpha
=
0.0
;
double
beta
=
0.0
;
double
k
=
0.0
;
miopenGetLRNDescriptor
(
lrnd
,
&
mode
,
&
n
,
&
alpha
,
&
beta
,
&
k
);
return
pack
(
f
(
std
::
move
(
mode
),
"mode"
),
// NOLINT
f
(
std
::
move
(
n
),
"n"
),
// NOLINT
f
(
std
::
move
(
alpha
),
"alpha"
),
// NOLINT
f
(
std
::
move
(
beta
),
"beta"
),
// NOLINT
f
(
std
::
move
(
k
),
"k"
));
// NOLINT
}
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/targets/gpu/include/migraphx/gpu/pad.hpp
View file @
4220eebf
...
@@ -14,6 +14,12 @@ struct hip_pad
...
@@ -14,6 +14,12 @@ struct hip_pad
{
{
op
::
pad
op
;
op
::
pad
op
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"gpu::pad"
;
}
std
::
string
name
()
const
{
return
"gpu::pad"
;
}
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
;
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/pooling.hpp
View file @
4220eebf
...
@@ -16,6 +16,12 @@ struct miopen_pooling
...
@@ -16,6 +16,12 @@ struct miopen_pooling
op
::
pooling
op
;
op
::
pooling
op
;
shared
<
pooling_descriptor
>
pd
;
shared
<
pooling_descriptor
>
pd
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"gpu::pooling"
;
}
std
::
string
name
()
const
{
return
"gpu::pooling"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/quant_convolution.hpp
View file @
4220eebf
...
@@ -22,7 +22,7 @@ struct miopen_quant_convolution
...
@@ -22,7 +22,7 @@ struct miopen_quant_convolution
static
auto
reflect
(
Self
&
self
,
F
f
)
static
auto
reflect
(
Self
&
self
,
F
f
)
{
{
// TODO: Add algo
// TODO: Add algo
return
op
::
convolution
::
reflect
(
self
.
op
,
f
);
return
op
::
quant_
convolution
::
reflect
(
self
.
op
,
f
);
}
}
std
::
string
name
()
const
{
return
"gpu::quant_convolution"
;
}
std
::
string
name
()
const
{
return
"gpu::quant_convolution"
;
}
...
...
src/targets/gpu/include/migraphx/gpu/quant_gemm.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_quant_gemm
struct
miopen_quant_gemm
{
{
op
::
quant_dot
op
;
op
::
quant_dot
op
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"gpu::quant_gemm"
;
}
std
::
string
name
()
const
{
return
"gpu::quant_gemm"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/relu.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_relu
struct
miopen_relu
{
{
shared
<
activation_descriptor
>
ad
;
shared
<
activation_descriptor
>
ad
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
gpu
::
reflect
(
self
.
ad
.
get
(),
f
);
}
std
::
string
name
()
const
{
return
"gpu::relu"
;
}
std
::
string
name
()
const
{
return
"gpu::relu"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/sigmoid.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_sigmoid
struct
miopen_sigmoid
{
{
shared
<
activation_descriptor
>
ad
;
shared
<
activation_descriptor
>
ad
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
gpu
::
reflect
(
self
.
ad
.
get
(),
f
);
}
std
::
string
name
()
const
{
return
"gpu::sigmoid"
;
}
std
::
string
name
()
const
{
return
"gpu::sigmoid"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/softmax.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_softmax
struct
miopen_softmax
{
{
op
::
softmax
op
;
op
::
softmax
op
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"gpu::softmax"
;
}
std
::
string
name
()
const
{
return
"gpu::softmax"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/include/migraphx/gpu/tanh.hpp
View file @
4220eebf
...
@@ -13,6 +13,13 @@ struct context;
...
@@ -13,6 +13,13 @@ struct context;
struct
miopen_tanh
struct
miopen_tanh
{
{
shared
<
activation_descriptor
>
ad
;
shared
<
activation_descriptor
>
ad
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
gpu
::
reflect
(
self
.
ad
.
get
(),
f
);
}
std
::
string
name
()
const
{
return
"gpu::tanh"
;
}
std
::
string
name
()
const
{
return
"gpu::tanh"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
;
argument
argument
...
...
src/targets/gpu/write_literals.cpp
View file @
4220eebf
...
@@ -14,6 +14,13 @@ struct hip_load_literal
...
@@ -14,6 +14,13 @@ struct hip_load_literal
{
{
shape
s
;
shape
s
;
std
::
size_t
n
=
0
;
std
::
size_t
n
=
0
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
pack
(
f
(
self
.
s
,
"shape"
),
f
(
self
.
n
,
"id"
));
}
std
::
string
name
()
const
{
return
"hip::load_literal"
;
}
std
::
string
name
()
const
{
return
"hip::load_literal"
;
}
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
shape
compute_shape
(
const
std
::
vector
<
shape
>&
inputs
)
const
{
{
...
...
test/eliminate_allocation_test.cpp
View file @
4220eebf
...
@@ -20,6 +20,13 @@ struct eliminate_allocation_target
...
@@ -20,6 +20,13 @@ struct eliminate_allocation_target
struct
allocate
struct
allocate
{
{
migraphx
::
shape
s
{};
migraphx
::
shape
s
{};
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
pack
(
f
(
self
.
s
,
"shape"
));
}
std
::
string
name
()
const
{
return
"allocate"
;
}
std
::
string
name
()
const
{
return
"allocate"
;
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
{
{
...
...
test/eliminate_concat_test.cpp
View file @
4220eebf
...
@@ -10,6 +10,13 @@ struct concat
...
@@ -10,6 +10,13 @@ struct concat
{
{
concat
(
std
::
size_t
axis
)
{
op
.
axis
=
axis
;
}
concat
(
std
::
size_t
axis
)
{
op
.
axis
=
axis
;
}
migraphx
::
op
::
concat
op
;
migraphx
::
op
::
concat
op
;
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
reflect
(
self
.
op
,
f
);
}
std
::
string
name
()
const
{
return
"eliminate_concat::concat"
;
}
std
::
string
name
()
const
{
return
"eliminate_concat::concat"
;
}
migraphx
::
shape
compute_shape
(
std
::
vector
<
migraphx
::
shape
>
inputs
)
const
migraphx
::
shape
compute_shape
(
std
::
vector
<
migraphx
::
shape
>
inputs
)
const
{
{
...
@@ -51,6 +58,13 @@ struct eliminate_concat_target
...
@@ -51,6 +58,13 @@ struct eliminate_concat_target
struct
allocate
struct
allocate
{
{
migraphx
::
shape
s
{};
migraphx
::
shape
s
{};
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
pack
(
f
(
self
.
s
,
"shape"
));
}
std
::
string
name
()
const
{
return
"allocate"
;
}
std
::
string
name
()
const
{
return
"allocate"
;
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
{
{
...
...
test/gpu/adjust_allocation.cpp
View file @
4220eebf
...
@@ -58,7 +58,7 @@ TEST_CASE(tanh_shape)
...
@@ -58,7 +58,7 @@ TEST_CASE(tanh_shape)
if
(
ins
->
name
()
==
"hip::allocate"
)
if
(
ins
->
name
()
==
"hip::allocate"
)
{
{
migraphx
::
shape
new_s
{
migraphx
::
shape
::
float_type
,
{
3
,
2
},
{
1
,
3
}};
migraphx
::
shape
new_s
{
migraphx
::
shape
::
float_type
,
{
3
,
2
},
{
1
,
3
}};
migraphx
::
instruction
::
replace
(
ins
,
ins
->
get_operator
(),
new_s
,
ins
->
inputs
()
);
ins
->
replace
(
migraphx
::
gpu
::
hip_allocate
{
new_s
}
);
}
}
}
}
EXPECT
(
p1
!=
p2
);
EXPECT
(
p1
!=
p2
);
...
...
test/memory_coloring_test.cpp
View file @
4220eebf
...
@@ -18,6 +18,13 @@ struct memory_coloring_target
...
@@ -18,6 +18,13 @@ struct memory_coloring_target
struct
allocate
struct
allocate
{
{
migraphx
::
shape
s
{};
migraphx
::
shape
s
{};
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
{
return
migraphx
::
pack
(
f
(
self
.
s
,
"shape"
));
}
std
::
string
name
()
const
{
return
"allocate"
;
}
std
::
string
name
()
const
{
return
"allocate"
;
}
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
migraphx
::
shape
compute_shape
(
const
std
::
vector
<
migraphx
::
shape
>&
inputs
)
const
{
{
...
...
test/print_graph_test.cpp
View file @
4220eebf
...
@@ -29,12 +29,12 @@ TEST_CASE(basic_graph_test)
...
@@ -29,12 +29,12 @@ TEST_CASE(basic_graph_test)
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@0
\"
[label=
\"
@literal
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@0
\"
[label=
\"
@literal
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
y
\"
[label=
\"
@param:y
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
y
\"
[label=
\"
@param:y
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
x
\"
[label=
\"
@param:x
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
x
\"
[label=
\"
@param:x
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
3
\"
[label=
\"
sum
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
1
\"
[label=
\"
sum
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
4
\"
[label=
\"
sum
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
2
\"
[label=
\"
sum
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
x
\"
->
\"
@
3
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
x
\"
->
\"
@
1
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
y
\"
->
\"
@
3
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
y
\"
->
\"
@
1
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
3
\"
->
\"
@
4
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@
1
\"
->
\"
@
2
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@0
\"
->
\"
@
4
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"
\"
@0
\"
->
\"
@
2
\"
"
));
EXPECT
(
migraphx
::
contains
(
test
,
"[label=
\"
int64_type, {1}, {0}
\"
]"
));
EXPECT
(
migraphx
::
contains
(
test
,
"[label=
\"
int64_type, {1}, {0}
\"
]"
));
}
}
...
...
tools/include/operation.hpp
View file @
4220eebf
...
@@ -69,7 +69,7 @@ auto operator<<(std::ostream& os, const T& x) -> decltype(os << x.name())
...
@@ -69,7 +69,7 @@ auto operator<<(std::ostream& os, const T& x) -> decltype(os << x.name())
{
{
os
<<
x
.
name
();
os
<<
x
.
name
();
char
delim
=
'['
;
char
delim
=
'['
;
reflect_each
(
x
,
[
&
](
auto
&
y
,
auto
name
)
{
reflect_each
(
x
,
[
&
](
auto
&
&
y
,
auto
name
)
{
os
<<
delim
;
os
<<
delim
;
os
<<
name
<<
"="
;
os
<<
name
<<
"="
;
stream_write_value
(
os
,
y
);
stream_write_value
(
os
,
y
);
...
@@ -87,6 +87,8 @@ namespace operation_equal {
...
@@ -87,6 +87,8 @@ namespace operation_equal {
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
auto
operator
==
(
const
T
&
x
,
const
U
&
y
)
->
decltype
(
x
.
name
()
==
y
.
name
())
auto
operator
==
(
const
T
&
x
,
const
U
&
y
)
->
decltype
(
x
.
name
()
==
y
.
name
())
{
{
static_assert
(
is_reflectable
<
T
>
{}
or
sizeof
(
T
)
<=
1
,
"Missing equality operator or reflect method."
);
if
(
x
.
name
()
!=
y
.
name
())
if
(
x
.
name
()
!=
y
.
name
())
return
false
;
return
false
;
const
auto
&
yy
=
any_cast
<
T
>
(
y
);
const
auto
&
yy
=
any_cast
<
T
>
(
y
);
...
@@ -175,7 +177,7 @@ auto is_context_free_op(const T& x) -> decltype(is_context_free_op(
...
@@ -175,7 +177,7 @@ auto is_context_free_op(const T& x) -> decltype(is_context_free_op(
}
}
template
<
class
T
>
template
<
class
T
>
in
t
output_alias_op
(
rank
<
0
>
,
const
T
&
,
const
std
::
vector
<
shape
>&
)
std
::
ptrdiff_
t
output_alias_op
(
rank
<
0
>
,
const
T
&
,
const
std
::
vector
<
shape
>&
)
{
{
return
-
1
;
return
-
1
;
}
}
...
@@ -188,7 +190,7 @@ auto output_alias_op(rank<1>, const T& x, const std::vector<shape>& shapes)
...
@@ -188,7 +190,7 @@ auto output_alias_op(rank<1>, const T& x, const std::vector<shape>& shapes)
}
}
template
<
class
T
>
template
<
class
T
>
in
t
output_alias_op
(
const
T
&
x
,
const
std
::
vector
<
shape
>&
shapes
)
std
::
ptrdiff_
t
output_alias_op
(
const
T
&
x
,
const
std
::
vector
<
shape
>&
shapes
)
{
{
return
output_alias_op
(
rank
<
1
>
{},
x
,
shapes
);
return
output_alias_op
(
rank
<
1
>
{},
x
,
shapes
);
}
}
...
@@ -238,7 +240,7 @@ auto has_finalize_op(const T&) -> decltype(has_finalize_op(rank<1>{},
...
@@ -238,7 +240,7 @@ auto has_finalize_op(const T&) -> decltype(has_finalize_op(rank<1>{},
virtual
(
'
is_context_free
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
is_context_free_op
'
),
virtual
(
'
is_context_free
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
is_context_free_op
'
),
virtual
(
'
has_finalize
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
has_finalize_op
'
),
virtual
(
'
has_finalize
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
has_finalize_op
'
),
virtual
(
'
output_alias
'
,
virtual
(
'
output_alias
'
,
returns
=
'
in
t
'
,
returns
=
'
std
::
ptrdiff_
t
'
,
input
=
'
const
std
::
vector
<
shape
>&
'
,
input
=
'
const
std
::
vector
<
shape
>&
'
,
const
=
True
,
const
=
True
,
default
=
'
output_alias_op
'
),
default
=
'
output_alias_op
'
),
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment