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
87446fc4
"...composable_kernel_rocm.git" did not exist on "612a35d682371327d694bd631724b37902c446a5"
Commit
87446fc4
authored
Apr 27, 2018
by
Paul
Browse files
s/operand/operation/
parent
5c48f17f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
include/rtg/builtin.hpp
include/rtg/builtin.hpp
+1
-1
include/rtg/instruction.hpp
include/rtg/instruction.hpp
+2
-2
include/rtg/operation.hpp
include/rtg/operation.hpp
+5
-5
include/rtg/operators.hpp
include/rtg/operators.hpp
+1
-1
include/rtg/program.hpp
include/rtg/program.hpp
+3
-3
No files found.
include/rtg/builtin.hpp
View file @
87446fc4
#ifndef RTG_GUARD_BUILTIN_HPP
#ifndef RTG_GUARD_BUILTIN_HPP
#define RTG_GUARD_BUILTIN_HPP
#define RTG_GUARD_BUILTIN_HPP
#include <rtg/operan
d
.hpp>
#include <rtg/opera
tio
n.hpp>
#include <rtg/errors.hpp>
#include <rtg/errors.hpp>
namespace
rtg
{
namespace
rtg
{
...
...
include/rtg/instruction.hpp
View file @
87446fc4
...
@@ -12,14 +12,14 @@ struct instruction
...
@@ -12,14 +12,14 @@ struct instruction
{
{
instruction
()
{}
instruction
()
{}
instruction
(
operan
d
o
,
shape
r
,
std
::
vector
<
instruction
*>
args
)
instruction
(
opera
tio
n
o
,
shape
r
,
std
::
vector
<
instruction
*>
args
)
:
op
(
std
::
move
(
o
)),
result
(
std
::
move
(
r
)),
arguments
(
std
::
move
(
args
))
:
op
(
std
::
move
(
o
)),
result
(
std
::
move
(
r
)),
arguments
(
std
::
move
(
args
))
{
{
}
}
instruction
(
literal
l
)
:
op
(
builtin
::
literal
{}),
result
(
l
.
get_shape
()),
lit
(
std
::
move
(
l
))
{}
instruction
(
literal
l
)
:
op
(
builtin
::
literal
{}),
result
(
l
.
get_shape
()),
lit
(
std
::
move
(
l
))
{}
operan
d
op
;
opera
tio
n
op
;
shape
result
;
shape
result
;
std
::
vector
<
instruction
*>
arguments
;
std
::
vector
<
instruction
*>
arguments
;
literal
lit
;
literal
lit
;
...
...
include/rtg/operan
d
.hpp
→
include/rtg/opera
tio
n.hpp
View file @
87446fc4
...
@@ -14,7 +14,7 @@ namespace rtg {
...
@@ -14,7 +14,7 @@ namespace rtg {
/*
/*
* Type-erased interface for:
* Type-erased interface for:
*
*
* struct operan
d
* struct opera
tio
n
* {
* {
* std::string name() const;
* std::string name() const;
* shape compute_shape(std::vector<shape> input) const;
* shape compute_shape(std::vector<shape> input) const;
...
@@ -23,13 +23,13 @@ namespace rtg {
...
@@ -23,13 +23,13 @@ namespace rtg {
*
*
*/
*/
struct
operan
d
struct
opera
tio
n
{
{
// Constructors
// Constructors
operan
d
()
=
default
;
opera
tio
n
()
=
default
;
template
<
typename
PrivateDetailTypeErasedT
>
template
<
typename
PrivateDetailTypeErasedT
>
operan
d
(
PrivateDetailTypeErasedT
value
)
opera
tio
n
(
PrivateDetailTypeErasedT
value
)
:
private_detail_te_handle_mem_var
(
:
private_detail_te_handle_mem_var
(
std
::
make_shared
<
private_detail_te_handle_type
<
std
::
make_shared
<
private_detail_te_handle_type
<
typename
std
::
remove_reference
<
PrivateDetailTypeErasedT
>::
type
>>
(
typename
std
::
remove_reference
<
PrivateDetailTypeErasedT
>::
type
>>
(
...
@@ -39,7 +39,7 @@ struct operand
...
@@ -39,7 +39,7 @@ struct operand
// Assignment
// Assignment
template
<
typename
PrivateDetailTypeErasedT
>
template
<
typename
PrivateDetailTypeErasedT
>
operan
d
&
operator
=
(
PrivateDetailTypeErasedT
value
)
opera
tio
n
&
operator
=
(
PrivateDetailTypeErasedT
value
)
{
{
if
(
private_detail_te_handle_mem_var
.
unique
())
if
(
private_detail_te_handle_mem_var
.
unique
())
*
private_detail_te_handle_mem_var
=
std
::
forward
<
PrivateDetailTypeErasedT
>
(
value
);
*
private_detail_te_handle_mem_var
=
std
::
forward
<
PrivateDetailTypeErasedT
>
(
value
);
...
...
include/rtg/operators.hpp
View file @
87446fc4
#ifndef RTG_GUARD_OPERATORS_HPP
#ifndef RTG_GUARD_OPERATORS_HPP
#define RTG_GUARD_OPERATORS_HPP
#define RTG_GUARD_OPERATORS_HPP
#include <rtg/operan
d
.hpp>
#include <rtg/opera
tio
n.hpp>
#include <rtg/stringutils.hpp>
#include <rtg/stringutils.hpp>
#include <cmath>
#include <cmath>
...
...
include/rtg/program.hpp
View file @
87446fc4
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
#include <list>
#include <list>
#include <unordered_map>
#include <unordered_map>
#include <rtg/instruction.hpp>
#include <rtg/instruction.hpp>
#include <rtg/operan
d
.hpp>
#include <rtg/opera
tio
n.hpp>
#include <rtg/builtin.hpp>
#include <rtg/builtin.hpp>
#include <algorithm>
#include <algorithm>
...
@@ -18,13 +18,13 @@ struct program
...
@@ -18,13 +18,13 @@ struct program
program
&
operator
=
(
const
program
&
)
=
delete
;
program
&
operator
=
(
const
program
&
)
=
delete
;
template
<
class
...
Ts
>
template
<
class
...
Ts
>
instruction
*
add_instruction
(
operan
d
op
,
Ts
*
...
args
)
instruction
*
add_instruction
(
opera
tio
n
op
,
Ts
*
...
args
)
{
{
shape
r
=
op
.
compute_shape
({
args
->
result
...});
shape
r
=
op
.
compute_shape
({
args
->
result
...});
instructions
.
push_back
({
op
,
r
,
{
args
...}});
instructions
.
push_back
({
op
,
r
,
{
args
...}});
return
std
::
addressof
(
instructions
.
back
());
return
std
::
addressof
(
instructions
.
back
());
}
}
instruction
*
add_instruction
(
operan
d
op
,
std
::
vector
<
instruction
*>
args
)
instruction
*
add_instruction
(
opera
tio
n
op
,
std
::
vector
<
instruction
*>
args
)
{
{
assert
(
std
::
all_of
(
assert
(
std
::
all_of
(
args
.
begin
(),
args
.
end
(),
[
&
](
instruction
*
x
)
{
return
has_instruction
(
x
);
})
&&
args
.
begin
(),
args
.
end
(),
[
&
](
instruction
*
x
)
{
return
has_instruction
(
x
);
})
&&
...
...
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