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
9b3b10ed
Commit
9b3b10ed
authored
Jul 02, 2022
by
Paul
Browse files
Merge branch 'mlir-c' into mlir-c-sqlite
parents
68d86c3d
595532cd
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
3561 additions
and
3791 deletions
+3561
-3791
examples/vision/python_yolov4/yolov4_inference.ipynb
examples/vision/python_yolov4/yolov4_inference.ipynb
+1
-1
src/driver/alexnet.cpp
src/driver/alexnet.cpp
+178
-161
src/driver/inceptionv3.cpp
src/driver/inceptionv3.cpp
+1891
-2208
src/driver/main.cpp
src/driver/main.cpp
+3
-0
src/driver/resnet50.cpp
src/driver/resnet50.cpp
+1013
-1217
src/fuse_pointwise.cpp
src/fuse_pointwise.cpp
+1
-1
src/include/migraphx/iota_iterator.hpp
src/include/migraphx/iota_iterator.hpp
+2
-1
src/include/migraphx/module.hpp
src/include/migraphx/module.hpp
+30
-4
src/include/migraphx/op/nonmaxsuppression.hpp
src/include/migraphx/op/nonmaxsuppression.hpp
+115
-99
src/include/migraphx/stringutils.hpp
src/include/migraphx/stringutils.hpp
+8
-2
src/inline_module.cpp
src/inline_module.cpp
+1
-1
src/module.cpp
src/module.cpp
+143
-92
src/program.cpp
src/program.cpp
+9
-2
src/targets/gpu/fuse_mlir.cpp
src/targets/gpu/fuse_mlir.cpp
+1
-1
test/gpu/mlir.cpp
test/gpu/mlir.cpp
+1
-1
test/module_test.cpp
test/module_test.cpp
+90
-0
test/ref_ops_test.cpp
test/ref_ops_test.cpp
+74
-0
No files found.
examples/vision/python_yolov4/yolov4_inference.ipynb
View file @
9b3b10ed
...
...
@@ -80,7 +80,7 @@
"outputs": [],
"source": [
"if not os.path.exists(\"yolov4_fp16.mxr\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --fp16
ref
--binary -o yolov4_fp16.mxr\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --fp16 --binary -o yolov4_fp16.mxr\n",
"if not os.path.exists(\"yolov4.mxr\"):\n",
" !/opt/rocm/bin/migraphx-driver compile ./utilities/yolov4.onnx --gpu --enable-offload-copy --binary -o yolov4.mxr"
]
...
...
src/driver/alexnet.cpp
View file @
9b3b10ed
/*
* The MIT License (MIT)
*
...
...
@@ -21,10 +22,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <migraphx/
operators
.hpp>
#include <migraphx/
make_op
.hpp>
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/
apply_alpha_beta
.hpp>
#include <migraphx/
json
.hpp>
#include "models.hpp"
namespace
migraphx
{
...
...
@@ -34,173 +35,189 @@ inline namespace MIGRAPHX_INLINE_NS {
migraphx
::
program
alexnet
(
unsigned
batch
)
// NOLINT(readability-function-size)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
m0
=
m
m
->
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
batch
,
3
,
224
,
224
}}
);
auto
mx0
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
000
}},
0
));
auto
mx1
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
000
,
4096
}},
1
));
auto
mx2
=
mm
->
add_
li
ter
al
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4096
}},
2
)
);
auto
mx3
=
mm
->
add_literal
(
migraphx
::
module_ref
mmain
=
p
.
get_main_module
();
auto
x_main_module_0
=
mmain
->
add_literal
(
migraphx
::
abs
(
m
igraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}},
0
))
);
auto
x_main_module_1
=
mm
ain
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}},
1
)
));
auto
x_main_module_2
=
mm
ain
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}},
2
)
));
auto
x_input_1
=
mm
ain
->
add_
parame
ter
(
"input.1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
batch
,
3
,
224
,
224
}}
);
auto
x_main_module_4
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4096
,
4096
}},
3
));
auto
mx4
=
mm
->
add_literal
(
auto
x_main_module_5
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4096
}},
4
));
auto
mx5
=
mm
->
add_literal
(
auto
x_main_module_6
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
4096
,
9216
}},
5
));
auto
mx6
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
25
6
}},
6
));
auto
mx7
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
7
));
auto
mx8
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
8
));
auto
mx9
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
auto
x_main_module_7
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
409
6
}},
6
));
auto
x_main_module_8
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1000
,
4096
}},
7
));
auto
x_main_module_9
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1000
}},
8
));
auto
x_main_module_10
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
384
,
3
,
3
}},
9
));
auto
mx10
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
384
}},
10
));
auto
mx11
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
auto
x_main_module_11
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
10
));
auto
x_main_module_12
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
384
,
192
,
3
,
3
}},
11
));
auto
mx12
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
192
}},
12
));
auto
mx13
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
auto
x_main_module_13
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
384
}},
12
));
auto
x_main_module_14
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
192
,
64
,
5
,
5
}},
13
));
auto
mx14
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
14
));
auto
mx15
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
3
,
11
,
11
}},
15
));
migraphx
::
op
::
convolution
convolution16
;
convolution16
.
padding
=
{
2
,
2
};
convolution16
.
stride
=
{
4
,
4
};
convolution16
.
dilation
=
{
1
,
1
};
convolution16
.
group
=
1
;
auto
mx16
=
mm
->
add_instruction
(
convolution16
,
m0
,
mx15
);
migraphx
::
op
::
broadcast
broadcast17
;
broadcast17
.
axis
=
1
;
broadcast17
.
broadcast_lens
=
{
batch
,
64
,
55
,
55
};
auto
mx17
=
mm
->
add_instruction
(
broadcast17
,
mx14
);
migraphx
::
op
::
add
add18
;
auto
mx18
=
mm
->
add_instruction
(
add18
,
mx16
,
mx17
);
migraphx
::
op
::
relu
relu19
;
auto
mx19
=
mm
->
add_instruction
(
relu19
,
mx18
);
migraphx
::
op
::
pooling
pooling20
;
pooling20
.
mode
=
migraphx
::
op
::
pooling_mode
::
max
;
pooling20
.
padding
=
{
0
,
0
};
pooling20
.
stride
=
{
2
,
2
};
pooling20
.
lengths
=
{
3
,
3
};
auto
mx20
=
mm
->
add_instruction
(
pooling20
,
mx19
);
migraphx
::
op
::
convolution
convolution21
;
convolution21
.
padding
=
{
2
,
2
};
convolution21
.
stride
=
{
1
,
1
};
convolution21
.
dilation
=
{
1
,
1
};
convolution21
.
group
=
1
;
auto
mx21
=
mm
->
add_instruction
(
convolution21
,
mx20
,
mx13
);
migraphx
::
op
::
broadcast
broadcast22
;
broadcast22
.
axis
=
1
;
broadcast22
.
broadcast_lens
=
{
batch
,
192
,
27
,
27
};
auto
mx22
=
mm
->
add_instruction
(
broadcast22
,
mx12
);
migraphx
::
op
::
add
add23
;
auto
mx23
=
mm
->
add_instruction
(
add23
,
mx21
,
mx22
);
migraphx
::
op
::
relu
relu24
;
auto
mx24
=
mm
->
add_instruction
(
relu24
,
mx23
);
migraphx
::
op
::
pooling
pooling25
;
pooling25
.
mode
=
migraphx
::
op
::
pooling_mode
::
max
;
pooling25
.
padding
=
{
0
,
0
};
pooling25
.
stride
=
{
2
,
2
};
pooling25
.
lengths
=
{
3
,
3
};
auto
mx25
=
mm
->
add_instruction
(
pooling25
,
mx24
);
migraphx
::
op
::
convolution
convolution26
;
convolution26
.
padding
=
{
1
,
1
};
convolution26
.
stride
=
{
1
,
1
};
convolution26
.
dilation
=
{
1
,
1
};
convolution26
.
group
=
1
;
auto
mx26
=
mm
->
add_instruction
(
convolution26
,
mx25
,
mx11
);
migraphx
::
op
::
broadcast
broadcast27
;
broadcast27
.
axis
=
1
;
broadcast27
.
broadcast_lens
=
{
batch
,
384
,
13
,
13
};
auto
mx27
=
mm
->
add_instruction
(
broadcast27
,
mx10
);
migraphx
::
op
::
add
add28
;
auto
mx28
=
mm
->
add_instruction
(
add28
,
mx26
,
mx27
);
migraphx
::
op
::
relu
relu29
;
auto
mx29
=
mm
->
add_instruction
(
relu29
,
mx28
);
migraphx
::
op
::
convolution
convolution30
;
convolution30
.
padding
=
{
1
,
1
};
convolution30
.
stride
=
{
1
,
1
};
convolution30
.
dilation
=
{
1
,
1
};
convolution30
.
group
=
1
;
auto
mx30
=
mm
->
add_instruction
(
convolution30
,
mx29
,
mx9
);
migraphx
::
op
::
broadcast
broadcast31
;
broadcast31
.
axis
=
1
;
broadcast31
.
broadcast_lens
=
{
batch
,
256
,
13
,
13
};
auto
mx31
=
mm
->
add_instruction
(
broadcast31
,
mx8
);
migraphx
::
op
::
add
add32
;
auto
mx32
=
mm
->
add_instruction
(
add32
,
mx30
,
mx31
);
migraphx
::
op
::
relu
relu33
;
auto
mx33
=
mm
->
add_instruction
(
relu33
,
mx32
);
migraphx
::
op
::
convolution
convolution34
;
convolution34
.
padding
=
{
1
,
1
};
convolution34
.
stride
=
{
1
,
1
};
convolution34
.
dilation
=
{
1
,
1
};
convolution34
.
group
=
1
;
auto
mx34
=
mm
->
add_instruction
(
convolution34
,
mx33
,
mx7
);
migraphx
::
op
::
broadcast
broadcast35
;
broadcast35
.
axis
=
1
;
broadcast35
.
broadcast_lens
=
{
batch
,
256
,
13
,
13
};
auto
mx35
=
mm
->
add_instruction
(
broadcast35
,
mx6
);
migraphx
::
op
::
add
add36
;
auto
mx36
=
mm
->
add_instruction
(
add36
,
mx34
,
mx35
);
migraphx
::
op
::
relu
relu37
;
auto
mx37
=
mm
->
add_instruction
(
relu37
,
mx36
);
migraphx
::
op
::
pooling
pooling38
;
pooling38
.
mode
=
migraphx
::
op
::
pooling_mode
::
max
;
pooling38
.
padding
=
{
0
,
0
};
pooling38
.
stride
=
{
2
,
2
};
pooling38
.
lengths
=
{
3
,
3
};
auto
mx38
=
mm
->
add_instruction
(
pooling38
,
mx37
);
migraphx
::
op
::
flatten
flatten39
;
flatten39
.
axis
=
1
;
auto
mx39
=
mm
->
add_instruction
(
flatten39
,
mx38
);
migraphx
::
op
::
identity
identity40
;
auto
mx40
=
mm
->
add_instruction
(
identity40
,
mx39
);
migraphx
::
op
::
transpose
transpose41
;
transpose41
.
dims
=
{
1
,
0
};
auto
mx41
=
mm
->
add_instruction
(
transpose41
,
mx5
);
migraphx
::
op
::
multibroadcast
multibroadcast42
;
multibroadcast42
.
output_lens
=
{
batch
,
4096
};
auto
mx42
=
mm
->
add_instruction
(
multibroadcast42
,
mx4
);
float
dot43_alpha
=
1
;
float
dot43_beta
=
1
;
auto
mx43
=
migraphx
::
add_apply_alpha_beta
(
*
mm
,
{
mx40
,
mx41
,
mx42
},
migraphx
::
make_op
(
"dot"
),
dot43_alpha
,
dot43_beta
);
migraphx
::
op
::
relu
relu44
;
auto
mx44
=
mm
->
add_instruction
(
relu44
,
mx43
);
migraphx
::
op
::
identity
identity45
;
auto
mx45
=
mm
->
add_instruction
(
identity45
,
mx44
);
migraphx
::
op
::
transpose
transpose46
;
transpose46
.
dims
=
{
1
,
0
};
auto
mx46
=
mm
->
add_instruction
(
transpose46
,
mx3
);
migraphx
::
op
::
multibroadcast
multibroadcast47
;
multibroadcast47
.
output_lens
=
{
batch
,
4096
};
auto
mx47
=
mm
->
add_instruction
(
multibroadcast47
,
mx2
);
float
dot48_alpha
=
1
;
float
dot48_beta
=
1
;
auto
mx48
=
migraphx
::
add_apply_alpha_beta
(
*
mm
,
{
mx45
,
mx46
,
mx47
},
migraphx
::
make_op
(
"dot"
),
dot48_alpha
,
dot48_beta
);
migraphx
::
op
::
relu
relu49
;
auto
mx49
=
mm
->
add_instruction
(
relu49
,
mx48
);
migraphx
::
op
::
transpose
transpose50
;
transpose50
.
dims
=
{
1
,
0
};
auto
mx50
=
mm
->
add_instruction
(
transpose50
,
mx1
);
migraphx
::
op
::
multibroadcast
multibroadcast51
;
multibroadcast51
.
output_lens
=
{
batch
,
1000
};
auto
mx51
=
mm
->
add_instruction
(
multibroadcast51
,
mx0
);
float
dot52_alpha
=
1
;
float
dot52_beta
=
1
;
migraphx
::
add_apply_alpha_beta
(
*
mm
,
{
mx49
,
mx50
,
mx51
},
migraphx
::
make_op
(
"dot"
),
dot52_alpha
,
dot52_beta
);
auto
x_main_module_15
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
192
}},
14
));
auto
x_main_module_16
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
15
));
auto
x_main_module_17
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
16
));
auto
x_main_module_18
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
3
,
11
,
11
}},
17
));
auto
x_main_module_19
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
18
));
auto
x_main_module_20
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[2,2,2,2],padding_mode:0,stride:[4,4]}"
)),
x_input_1
,
x_main_module_18
);
auto
x_main_module_21
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,55,55]}"
)),
x_main_module_19
);
auto
x_main_module_22
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_20
,
x_main_module_21
);
auto
x_main_module_23
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_22
);
auto
x_main_module_24
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"pooling"
,
migraphx
::
from_json_string
(
"{ceil_mode:0,lengths:[3,3],lp_order:2,mode:1,padding:[0,0,0,0],stride:[2,2]}"
)),
x_main_module_23
);
auto
x_main_module_25
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[2,2,2,2],padding_mode:0,stride:[1,1]}"
)),
x_main_module_24
,
x_main_module_14
);
auto
x_main_module_26
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,192,27,27]}"
)),
x_main_module_15
);
auto
x_main_module_27
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_25
,
x_main_module_26
);
auto
x_main_module_28
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_27
);
auto
x_main_module_29
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"pooling"
,
migraphx
::
from_json_string
(
"{ceil_mode:0,lengths:[3,3],lp_order:2,mode:1,padding:[0,0,0,0],stride:[2,2]}"
)),
x_main_module_28
);
auto
x_main_module_30
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_29
,
x_main_module_12
);
auto
x_main_module_31
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,384,13,13]}"
)),
x_main_module_13
);
auto
x_main_module_32
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_30
,
x_main_module_31
);
auto
x_main_module_33
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_32
);
auto
x_main_module_34
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_33
,
x_main_module_10
);
auto
x_main_module_35
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,13,13]}"
)),
x_main_module_11
);
auto
x_main_module_36
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_34
,
x_main_module_35
);
auto
x_main_module_37
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_36
);
auto
x_main_module_38
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_37
,
x_main_module_16
);
auto
x_main_module_39
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,13,13]}"
)),
x_main_module_17
);
auto
x_main_module_40
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_38
,
x_main_module_39
);
auto
x_main_module_41
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_40
);
auto
x_main_module_42
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"pooling"
,
migraphx
::
from_json_string
(
"{ceil_mode:0,lengths:[3,3],lp_order:2,mode:1,padding:[0,0,0,0],stride:[2,2]}"
)),
x_main_module_41
);
auto
x_main_module_43
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"reshape"
,
migraphx
::
from_json_string
(
"{dims:[1,9216]}"
)),
x_main_module_42
);
auto
x_main_module_44
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
migraphx
::
from_json_string
(
"{permutation:[1,0]}"
)),
x_main_module_6
);
auto
x_main_module_45
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
x_main_module_43
,
x_main_module_44
);
auto
x_main_module_46
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,4096]}"
)),
x_main_module_7
);
auto
x_main_module_47
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,4096]}"
)),
x_main_module_2
);
auto
x_main_module_48
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"mul"
),
x_main_module_46
,
x_main_module_47
);
auto
x_main_module_49
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_45
,
x_main_module_48
);
auto
x_main_module_50
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_49
);
auto
x_main_module_51
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
migraphx
::
from_json_string
(
"{permutation:[1,0]}"
)),
x_main_module_4
);
auto
x_main_module_52
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
x_main_module_50
,
x_main_module_51
);
auto
x_main_module_53
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,4096]}"
)),
x_main_module_5
);
auto
x_main_module_54
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,4096]}"
)),
x_main_module_1
);
auto
x_main_module_55
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"mul"
),
x_main_module_53
,
x_main_module_54
);
auto
x_main_module_56
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_52
,
x_main_module_55
);
auto
x_main_module_57
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_56
);
auto
x_main_module_58
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
migraphx
::
from_json_string
(
"{permutation:[1,0]}"
)),
x_main_module_8
);
auto
x_main_module_59
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
x_main_module_57
,
x_main_module_58
);
auto
x_main_module_60
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,1000]}"
)),
x_main_module_9
);
auto
x_main_module_61
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,1000]}"
)),
x_main_module_0
);
auto
x_main_module_62
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"mul"
),
x_main_module_60
,
x_main_module_61
);
auto
x_main_module_63
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_59
,
x_main_module_62
);
mmain
->
add_return
({
x_main_module_63
});
return
p
;
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace driver
}
// namespace migraphx
src/driver/inceptionv3.cpp
View file @
9b3b10ed
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/driver/main.cpp
View file @
9b3b10ed
...
...
@@ -210,6 +210,9 @@ struct loader
auto
last
=
std
::
prev
(
mm
->
end
(),
trim
);
mm
->
remove_instructions
(
last
,
mm
->
end
());
}
// Remove unused variable when exporting to cpp
if
(
output_type
==
"cpp"
)
migraphx
::
run_passes
(
*
p
.
get_main_module
(),
{
migraphx
::
dead_code_elimination
{}});
if
(
optimize
)
{
migraphx
::
run_passes
(
*
p
.
get_main_module
(),
...
...
src/driver/resnet50.cpp
View file @
9b3b10ed
/*
* The MIT License (MIT)
*
...
...
@@ -21,10 +22,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <migraphx/
operators
.hpp>
#include <migraphx/
make_op
.hpp>
#include <migraphx/program.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/
apply_alpha_beta
.hpp>
#include <migraphx/
json
.hpp>
#include "models.hpp"
namespace
migraphx
{
...
...
@@ -34,1231 +35,1026 @@ inline namespace MIGRAPHX_INLINE_NS {
migraphx
::
program
resnet50
(
unsigned
batch
)
// NOLINT(readability-function-size)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
auto
m0
=
m
m
->
add_parameter
(
"0"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
batch
,
3
,
224
,
224
}}
);
auto
mx0
=
mm
->
add_
li
ter
al
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1000
}},
0
)
);
auto
mx1
=
mm
->
add_literal
(
migraphx
::
module_ref
mmain
=
p
.
get_main_module
();
auto
x_main_module_0
=
mmain
->
add_literal
(
migraphx
::
abs
(
m
igraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
}},
0
))
);
auto
x_input_1
=
mm
ain
->
add_
parame
ter
(
"input.1"
,
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
batch
,
3
,
224
,
224
}}
);
auto
x_main_module_2
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1000
,
2048
}},
1
));
auto
mx2
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
2
))
)
;
auto
mx3
=
mm
->
add_literal
(
auto
x_main_module_3
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1000
}},
2
));
auto
x_main_module_4
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
3
));
auto
mx4
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
4
));
auto
mx5
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
5
))
)
;
auto
mx6
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
6
));
auto
mx7
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
7
))
)
;
auto
mx8
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
8
));
auto
mx9
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
9
));
auto
mx10
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
10
))
)
;
auto
mx11
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
11
));
auto
mx12
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
12
))
)
;
auto
mx13
=
mm
->
add_literal
(
auto
x_main_module_5
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
4
));
auto
x_main_module_6
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
5
));
auto
x_main_module_7
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
6
));
auto
x_main_module_8
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
7
));
auto
x_main_module_9
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
2048
,
1
,
1
}},
8
));
auto
x_main_module_10
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
9
));
auto
x_main_module_11
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
10
));
auto
x_main_module_12
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
11
));
auto
x_main_module_13
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
12
));
auto
x_main_module_14
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
13
));
auto
mx14
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
14
));
auto
mx15
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
15
))
)
;
auto
mx16
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
2048
,
1
,
1
}},
16
));
auto
mx17
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
17
))
)
;
auto
mx18
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
18
));
auto
mx19
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
19
));
auto
mx20
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
20
))
)
;
auto
mx21
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
21
));
auto
mx22
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
22
))
)
;
auto
mx23
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
23
));
auto
mx24
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
24
));
auto
mx25
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
25
))
)
;
auto
mx26
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
26
));
auto
mx27
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
27
))
)
;
auto
mx28
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
28
));
auto
mx29
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
29
));
auto
mx30
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
30
))
)
;
auto
mx31
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
2048
,
1
,
1
}},
31
));
auto
mx32
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
32
))
)
;
auto
mx33
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
33
));
auto
mx34
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
34
));
auto
mx35
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
35
))
)
;
auto
mx36
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
1024
,
1
,
1
}},
36
));
auto
mx37
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
37
))
)
;
auto
mx38
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
38
));
auto
mx39
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
39
));
auto
mx40
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
048
}},
40
))
)
;
auto
mx41
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
41
));
auto
mx42
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
42
))
)
;
auto
mx43
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
43
));
auto
mx44
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
44
));
auto
mx45
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
45
))
)
;
auto
mx46
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
46
));
auto
mx47
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
47
))
)
;
auto
mx48
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
48
));
auto
mx49
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
49
));
auto
mx50
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
50
))
)
;
auto
mx51
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
1024
,
1
,
1
}},
51
));
auto
mx52
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
52
))
)
;
auto
mx53
=
mm
->
add_literal
(
auto
x_main_module_15
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
2048
,
1
,
1
}},
14
));
auto
x_main_module_16
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
15
));
auto
x_main_module_17
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
1024
,
1
,
1
}},
16
));
auto
x_main_module_18
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
}},
17
));
auto
x_main_module_19
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2048
,
512
,
1
,
1
}},
18
));
auto
x_main_module_20
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
19
));
auto
x_main_module_21
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
512
,
3
,
3
}},
20
));
auto
x_main_module_22
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
21
));
auto
x_main_module_23
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
1024
,
1
,
1
}},
22
));
auto
x_main_module_24
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
23
));
auto
x_main_module_25
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
24
));
auto
x_main_module_26
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
25
));
auto
x_main_module_27
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
26
));
auto
x_main_module_28
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
27
));
auto
x_main_module_29
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
28
));
auto
x_main_module_30
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
29
));
auto
x_main_module_31
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
30
));
auto
x_main_module_32
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
31
));
auto
x_main_module_33
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
,
256
,
3
,
3
}},
32
));
auto
x_main_module_34
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
}},
33
));
auto
x_main_module_35
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
,
1024
,
1
,
1
}},
34
));
auto
x_main_module_36
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
35
));
auto
x_main_module_37
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
36
));
auto
x_main_module_38
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
}},
37
));
auto
x_main_module_39
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
,
256
,
3
,
3
}},
38
));
auto
x_main_module_40
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
}},
39
));
auto
x_main_module_41
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
2
56
,
1024
,
1
,
1
}},
40
));
auto
x_main_module_42
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
41
));
auto
x_main_module_43
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
42
));
auto
x_main_module_44
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
43
));
auto
x_main_module_45
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
44
));
auto
x_main_module_46
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
45
));
auto
x_main_module_47
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
46
));
auto
x_main_module_48
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
47
));
auto
x_main_module_49
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
48
));
auto
x_main_module_50
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
49
));
auto
x_main_module_51
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
50
));
auto
x_main_module_52
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
51
));
auto
x_main_module_53
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
52
));
auto
x_main_module_54
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
53
));
auto
mx54
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
54
));
auto
mx55
=
mm
->
add_literal
(
auto
x_main_module_55
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
512
,
1
,
1
}},
54
));
auto
x_main_module_56
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
55
));
auto
mx56
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
auto
x_main_module_57
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
56
));
auto
mx57
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
57
))
)
;
auto
mx58
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
58
));
auto
mx59
=
mm
->
add_literal
(
auto
x_main_module_58
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
57
));
auto
x_main_module_59
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
58
));
auto
x_main_module_60
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
59
));
auto
mx60
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
60
))
)
;
auto
mx61
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
61
));
auto
mx62
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
62
))
)
;
auto
mx63
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
63
));
auto
mx64
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
64
));
auto
mx65
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
65
))
)
;
auto
mx66
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
66
));
auto
mx67
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
67
))
)
;
auto
mx68
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
68
));
auto
mx69
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
}},
69
));
auto
mx70
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
}},
70
));
auto
mx71
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
,
256
,
1
,
1
}},
71
));
auto
mx72
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
72
))
)
;
auto
mx73
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
73
));
auto
mx74
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
74
));
auto
mx75
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
75
))
)
;
auto
mx76
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
76
));
auto
mx77
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
77
))
)
;
auto
mx78
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
78
));
auto
mx79
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
79
));
auto
mx80
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
80
))
)
;
auto
mx81
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
81
));
auto
mx82
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
82
))
)
;
auto
mx83
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
}},
83
));
auto
mx84
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
}},
84
));
auto
mx85
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
}},
85
));
auto
mx86
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
024
,
256
,
1
,
1
}},
86
));
auto
mx87
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
87
))
)
;
auto
mx88
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
88
));
auto
mx89
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
25
6
}},
89
));
auto
mx90
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
90
))
)
;
auto
mx91
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
91
));
auto
mx92
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
92
))
)
;
auto
mx93
=
mm
->
add_literal
(
auto
x_main_module_61
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
512
,
1
,
1
}},
60
));
auto
x_main_module_62
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
61
));
auto
x_main_module_63
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
62
));
auto
x_main_module_64
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
63
));
auto
x_main_module_65
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
64
));
auto
x_main_module_66
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
65
));
auto
x_main_module_67
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
66
));
auto
x_main_module_68
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
67
));
auto
x_main_module_69
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
68
));
auto
x_main_module_70
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
}},
69
));
auto
x_main_module_71
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
,
128
,
3
,
3
}},
70
));
auto
x_main_module_72
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
}},
71
));
auto
x_main_module_73
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
72
));
auto
x_main_module_74
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
73
));
auto
x_main_module_75
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
74
));
auto
x_main_module_76
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
75
));
auto
x_main_module_77
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
76
));
auto
x_main_module_78
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
77
));
auto
x_main_module_79
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
78
));
auto
x_main_module_80
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
79
));
auto
x_main_module_81
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
256
,
1
,
1
}},
80
));
auto
x_main_module_82
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
81
));
auto
x_main_module_83
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
82
));
auto
x_main_module_84
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
}},
83
));
auto
x_main_module_85
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
,
128
,
3
,
3
}},
84
));
auto
x_main_module_86
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
}},
85
));
auto
x_main_module_87
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1
28
,
256
,
1
,
1
}},
86
));
auto
x_main_module_88
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
87
));
auto
x_main_module_89
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
88
));
auto
x_main_module_90
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
6
4
}},
89
));
auto
x_main_module_91
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
90
));
auto
x_main_module_92
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
91
));
auto
x_main_module_93
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
256
,
1
,
1
}},
92
));
auto
x_main_module_94
=
mm
ain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
93
));
auto
mx94
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
94
));
auto
mx95
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
95
)));
auto
mx96
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
96
));
auto
mx97
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
97
)));
auto
mx98
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
98
));
auto
mx99
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
99
));
auto
mx100
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
100
));
auto
mx101
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
101
));
auto
mx102
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
102
)));
auto
mx103
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
103
));
auto
mx104
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
104
));
auto
mx105
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
105
)));
auto
mx106
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
106
));
auto
mx107
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
107
)));
auto
mx108
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
108
));
auto
mx109
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
109
));
auto
mx110
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
110
)));
auto
mx111
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
111
));
auto
mx112
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
112
)));
auto
mx113
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
113
));
auto
mx114
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
114
));
auto
mx115
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
115
));
auto
mx116
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
116
));
auto
mx117
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
117
)));
auto
mx118
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
118
));
auto
mx119
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
119
));
auto
mx120
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
120
)));
auto
mx121
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
121
));
auto
mx122
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
122
)));
auto
mx123
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
123
));
auto
mx124
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
124
));
auto
mx125
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
125
)));
auto
mx126
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
1024
,
1
,
1
}},
126
));
auto
mx127
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
127
)));
auto
mx128
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
128
));
auto
mx129
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
129
));
auto
mx130
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
130
));
auto
mx131
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
512
,
1
,
1
}},
131
));
auto
mx132
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
132
)));
auto
mx133
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
133
));
auto
mx134
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
134
));
auto
mx135
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
}},
135
));
auto
mx136
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
1024
,
256
,
1
,
1
}},
136
));
auto
mx137
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
137
)));
auto
mx138
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
138
));
auto
mx139
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
139
));
auto
mx140
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
140
)));
auto
mx141
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
256
,
3
,
3
}},
141
));
auto
mx142
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
142
)));
auto
mx143
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
143
));
auto
mx144
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
144
));
auto
mx145
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
145
)));
auto
mx146
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
512
,
1
,
1
}},
146
));
auto
mx147
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
147
)));
auto
mx148
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
148
));
auto
mx149
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
149
));
auto
mx150
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
150
));
auto
mx151
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
151
));
auto
mx152
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
152
)));
auto
mx153
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
153
));
auto
mx154
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
154
));
auto
mx155
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
155
)));
auto
mx156
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
156
));
auto
mx157
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
157
)));
auto
mx158
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
158
));
auto
mx159
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
159
));
auto
mx160
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
160
)));
auto
mx161
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
161
));
auto
mx162
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
162
)));
auto
mx163
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
163
));
auto
mx164
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
164
));
auto
mx165
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
165
));
auto
mx166
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
166
));
auto
mx167
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
167
)));
auto
mx168
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
168
));
auto
mx169
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
169
));
auto
mx170
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
170
)));
auto
mx171
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
171
));
auto
mx172
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
172
)));
auto
mx173
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
173
));
auto
mx174
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
174
));
auto
mx175
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
175
)));
auto
mx176
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
176
));
auto
mx177
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
177
)));
auto
mx178
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
178
));
auto
mx179
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
179
));
auto
mx180
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
180
));
auto
mx181
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
181
));
auto
mx182
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
182
)));
auto
mx183
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
183
));
auto
mx184
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
184
));
auto
mx185
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
185
)));
auto
mx186
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
186
));
auto
mx187
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
187
)));
auto
mx188
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
188
));
auto
mx189
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
189
));
auto
mx190
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
190
)));
auto
mx191
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
512
,
1
,
1
}},
191
));
auto
mx192
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
192
)));
auto
mx193
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
193
));
auto
mx194
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
194
));
auto
mx195
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
195
));
auto
mx196
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
256
,
1
,
1
}},
196
));
auto
mx197
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
197
)));
auto
mx198
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
198
));
auto
mx199
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
199
));
auto
mx200
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
}},
200
));
auto
mx201
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
512
,
128
,
1
,
1
}},
201
));
auto
mx202
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
202
)));
auto
mx203
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
203
));
auto
mx204
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
204
));
auto
mx205
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
205
)));
auto
mx206
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
128
,
3
,
3
}},
206
));
auto
mx207
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
207
)));
auto
mx208
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
208
));
auto
mx209
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
209
));
auto
mx210
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
}},
210
)));
auto
mx211
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
128
,
256
,
1
,
1
}},
211
));
auto
mx212
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
212
)));
auto
mx213
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
213
));
auto
mx214
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
214
));
auto
mx215
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
215
));
auto
mx216
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
216
));
auto
mx217
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
217
)));
auto
mx218
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
218
));
auto
mx219
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
219
));
auto
mx220
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
220
)));
auto
mx221
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
221
));
auto
mx222
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
222
)));
auto
mx223
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
223
));
auto
mx224
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
224
));
auto
mx225
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
225
)));
auto
mx226
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
256
,
1
,
1
}},
226
));
auto
mx227
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
227
)));
auto
mx228
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
228
));
auto
mx229
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
229
));
auto
mx230
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
230
));
auto
mx231
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
231
));
auto
mx232
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
232
)));
auto
mx233
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
233
));
auto
mx234
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
234
));
auto
mx235
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
235
)));
auto
mx236
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
236
));
auto
mx237
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
237
)));
auto
mx238
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
238
));
auto
mx239
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
239
));
auto
mx240
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
240
)));
auto
mx241
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
256
,
1
,
1
}},
241
));
auto
mx242
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
242
)));
auto
mx243
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
243
));
auto
mx244
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
244
));
auto
mx245
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
245
));
auto
mx246
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
246
));
auto
mx247
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
247
)));
auto
mx248
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
248
));
auto
mx249
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
249
));
auto
mx250
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
250
));
auto
mx251
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
251
));
auto
mx252
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
252
)));
auto
mx253
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
253
));
auto
mx254
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
254
));
auto
mx255
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
255
)));
auto
mx256
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
256
));
auto
mx257
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
257
)));
auto
mx258
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
258
));
auto
mx259
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
259
));
auto
mx260
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
260
)));
auto
mx261
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
1
,
1
}},
261
));
auto
mx262
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
262
)));
auto
mx263
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
263
));
auto
mx264
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
264
));
auto
mx265
=
mm
->
add_literal
(
migraphx
::
abs
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
265
)));
auto
mx266
=
mm
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
3
,
7
,
7
}},
266
));
migraphx
::
op
::
convolution
convolution267
;
convolution267
.
padding
=
{
3
,
3
};
convolution267
.
stride
=
{
2
,
2
};
convolution267
.
dilation
=
{
1
,
1
};
convolution267
.
group
=
1
;
auto
mx267
=
mm
->
add_instruction
(
convolution267
,
m0
,
mx266
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference268
;
batch_norm_inference268
.
epsilon
=
1e-05
;
batch_norm_inference268
.
momentum
=
0.9
;
auto
mx268
=
mm
->
add_instruction
(
batch_norm_inference268
,
mx267
,
mx265
,
mx264
,
mx263
,
mx262
);
migraphx
::
op
::
relu
relu269
;
auto
mx269
=
mm
->
add_instruction
(
relu269
,
mx268
);
migraphx
::
op
::
pooling
pooling270
;
pooling270
.
mode
=
migraphx
::
op
::
pooling_mode
::
max
;
pooling270
.
padding
=
{
1
,
1
};
pooling270
.
stride
=
{
2
,
2
};
pooling270
.
lengths
=
{
3
,
3
};
auto
mx270
=
mm
->
add_instruction
(
pooling270
,
mx269
);
migraphx
::
op
::
convolution
convolution271
;
convolution271
.
padding
=
{
0
,
0
};
convolution271
.
stride
=
{
1
,
1
};
convolution271
.
dilation
=
{
1
,
1
};
convolution271
.
group
=
1
;
auto
mx271
=
mm
->
add_instruction
(
convolution271
,
mx270
,
mx261
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference272
;
batch_norm_inference272
.
epsilon
=
1e-05
;
batch_norm_inference272
.
momentum
=
0.9
;
auto
mx272
=
mm
->
add_instruction
(
batch_norm_inference272
,
mx271
,
mx260
,
mx259
,
mx258
,
mx257
);
migraphx
::
op
::
relu
relu273
;
auto
mx273
=
mm
->
add_instruction
(
relu273
,
mx272
);
migraphx
::
op
::
convolution
convolution274
;
convolution274
.
padding
=
{
1
,
1
};
convolution274
.
stride
=
{
1
,
1
};
convolution274
.
dilation
=
{
1
,
1
};
convolution274
.
group
=
1
;
auto
mx274
=
mm
->
add_instruction
(
convolution274
,
mx273
,
mx256
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference275
;
batch_norm_inference275
.
epsilon
=
1e-05
;
batch_norm_inference275
.
momentum
=
0.9
;
auto
mx275
=
mm
->
add_instruction
(
batch_norm_inference275
,
mx274
,
mx255
,
mx254
,
mx253
,
mx252
);
migraphx
::
op
::
relu
relu276
;
auto
mx276
=
mm
->
add_instruction
(
relu276
,
mx275
);
migraphx
::
op
::
convolution
convolution277
;
convolution277
.
padding
=
{
0
,
0
};
convolution277
.
stride
=
{
1
,
1
};
convolution277
.
dilation
=
{
1
,
1
};
convolution277
.
group
=
1
;
auto
mx277
=
mm
->
add_instruction
(
convolution277
,
mx276
,
mx251
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference278
;
batch_norm_inference278
.
epsilon
=
1e-05
;
batch_norm_inference278
.
momentum
=
0.9
;
auto
mx278
=
mm
->
add_instruction
(
batch_norm_inference278
,
mx277
,
mx250
,
mx249
,
mx248
,
mx247
);
migraphx
::
op
::
convolution
convolution279
;
convolution279
.
padding
=
{
0
,
0
};
convolution279
.
stride
=
{
1
,
1
};
convolution279
.
dilation
=
{
1
,
1
};
convolution279
.
group
=
1
;
auto
mx279
=
mm
->
add_instruction
(
convolution279
,
mx270
,
mx246
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference280
;
batch_norm_inference280
.
epsilon
=
1e-05
;
batch_norm_inference280
.
momentum
=
0.9
;
auto
mx280
=
mm
->
add_instruction
(
batch_norm_inference280
,
mx279
,
mx245
,
mx244
,
mx243
,
mx242
);
migraphx
::
op
::
add
add281
;
auto
mx281
=
mm
->
add_instruction
(
add281
,
mx278
,
mx280
);
migraphx
::
op
::
relu
relu282
;
auto
mx282
=
mm
->
add_instruction
(
relu282
,
mx281
);
migraphx
::
op
::
convolution
convolution283
;
convolution283
.
padding
=
{
0
,
0
};
convolution283
.
stride
=
{
1
,
1
};
convolution283
.
dilation
=
{
1
,
1
};
convolution283
.
group
=
1
;
auto
mx283
=
mm
->
add_instruction
(
convolution283
,
mx282
,
mx241
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference284
;
batch_norm_inference284
.
epsilon
=
1e-05
;
batch_norm_inference284
.
momentum
=
0.9
;
auto
mx284
=
mm
->
add_instruction
(
batch_norm_inference284
,
mx283
,
mx240
,
mx239
,
mx238
,
mx237
);
migraphx
::
op
::
relu
relu285
;
auto
mx285
=
mm
->
add_instruction
(
relu285
,
mx284
);
migraphx
::
op
::
convolution
convolution286
;
convolution286
.
padding
=
{
1
,
1
};
convolution286
.
stride
=
{
1
,
1
};
convolution286
.
dilation
=
{
1
,
1
};
convolution286
.
group
=
1
;
auto
mx286
=
mm
->
add_instruction
(
convolution286
,
mx285
,
mx236
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference287
;
batch_norm_inference287
.
epsilon
=
1e-05
;
batch_norm_inference287
.
momentum
=
0.9
;
auto
mx287
=
mm
->
add_instruction
(
batch_norm_inference287
,
mx286
,
mx235
,
mx234
,
mx233
,
mx232
);
migraphx
::
op
::
relu
relu288
;
auto
mx288
=
mm
->
add_instruction
(
relu288
,
mx287
);
migraphx
::
op
::
convolution
convolution289
;
convolution289
.
padding
=
{
0
,
0
};
convolution289
.
stride
=
{
1
,
1
};
convolution289
.
dilation
=
{
1
,
1
};
convolution289
.
group
=
1
;
auto
mx289
=
mm
->
add_instruction
(
convolution289
,
mx288
,
mx231
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference290
;
batch_norm_inference290
.
epsilon
=
1e-05
;
batch_norm_inference290
.
momentum
=
0.9
;
auto
mx290
=
mm
->
add_instruction
(
batch_norm_inference290
,
mx289
,
mx230
,
mx229
,
mx228
,
mx227
);
migraphx
::
op
::
add
add291
;
auto
mx291
=
mm
->
add_instruction
(
add291
,
mx290
,
mx282
);
migraphx
::
op
::
relu
relu292
;
auto
mx292
=
mm
->
add_instruction
(
relu292
,
mx291
);
migraphx
::
op
::
convolution
convolution293
;
convolution293
.
padding
=
{
0
,
0
};
convolution293
.
stride
=
{
1
,
1
};
convolution293
.
dilation
=
{
1
,
1
};
convolution293
.
group
=
1
;
auto
mx293
=
mm
->
add_instruction
(
convolution293
,
mx292
,
mx226
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference294
;
batch_norm_inference294
.
epsilon
=
1e-05
;
batch_norm_inference294
.
momentum
=
0.9
;
auto
mx294
=
mm
->
add_instruction
(
batch_norm_inference294
,
mx293
,
mx225
,
mx224
,
mx223
,
mx222
);
migraphx
::
op
::
relu
relu295
;
auto
mx295
=
mm
->
add_instruction
(
relu295
,
mx294
);
migraphx
::
op
::
convolution
convolution296
;
convolution296
.
padding
=
{
1
,
1
};
convolution296
.
stride
=
{
1
,
1
};
convolution296
.
dilation
=
{
1
,
1
};
convolution296
.
group
=
1
;
auto
mx296
=
mm
->
add_instruction
(
convolution296
,
mx295
,
mx221
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference297
;
batch_norm_inference297
.
epsilon
=
1e-05
;
batch_norm_inference297
.
momentum
=
0.9
;
auto
mx297
=
mm
->
add_instruction
(
batch_norm_inference297
,
mx296
,
mx220
,
mx219
,
mx218
,
mx217
);
migraphx
::
op
::
relu
relu298
;
auto
mx298
=
mm
->
add_instruction
(
relu298
,
mx297
);
migraphx
::
op
::
convolution
convolution299
;
convolution299
.
padding
=
{
0
,
0
};
convolution299
.
stride
=
{
1
,
1
};
convolution299
.
dilation
=
{
1
,
1
};
convolution299
.
group
=
1
;
auto
mx299
=
mm
->
add_instruction
(
convolution299
,
mx298
,
mx216
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference300
;
batch_norm_inference300
.
epsilon
=
1e-05
;
batch_norm_inference300
.
momentum
=
0.9
;
auto
mx300
=
mm
->
add_instruction
(
batch_norm_inference300
,
mx299
,
mx215
,
mx214
,
mx213
,
mx212
);
migraphx
::
op
::
add
add301
;
auto
mx301
=
mm
->
add_instruction
(
add301
,
mx300
,
mx292
);
migraphx
::
op
::
relu
relu302
;
auto
mx302
=
mm
->
add_instruction
(
relu302
,
mx301
);
migraphx
::
op
::
convolution
convolution303
;
convolution303
.
padding
=
{
0
,
0
};
convolution303
.
stride
=
{
1
,
1
};
convolution303
.
dilation
=
{
1
,
1
};
convolution303
.
group
=
1
;
auto
mx303
=
mm
->
add_instruction
(
convolution303
,
mx302
,
mx211
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference304
;
batch_norm_inference304
.
epsilon
=
1e-05
;
batch_norm_inference304
.
momentum
=
0.9
;
auto
mx304
=
mm
->
add_instruction
(
batch_norm_inference304
,
mx303
,
mx210
,
mx209
,
mx208
,
mx207
);
migraphx
::
op
::
relu
relu305
;
auto
mx305
=
mm
->
add_instruction
(
relu305
,
mx304
);
migraphx
::
op
::
convolution
convolution306
;
convolution306
.
padding
=
{
1
,
1
};
convolution306
.
stride
=
{
2
,
2
};
convolution306
.
dilation
=
{
1
,
1
};
convolution306
.
group
=
1
;
auto
mx306
=
mm
->
add_instruction
(
convolution306
,
mx305
,
mx206
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference307
;
batch_norm_inference307
.
epsilon
=
1e-05
;
batch_norm_inference307
.
momentum
=
0.9
;
auto
mx307
=
mm
->
add_instruction
(
batch_norm_inference307
,
mx306
,
mx205
,
mx204
,
mx203
,
mx202
);
migraphx
::
op
::
relu
relu308
;
auto
mx308
=
mm
->
add_instruction
(
relu308
,
mx307
);
migraphx
::
op
::
convolution
convolution309
;
convolution309
.
padding
=
{
0
,
0
};
convolution309
.
stride
=
{
1
,
1
};
convolution309
.
dilation
=
{
1
,
1
};
convolution309
.
group
=
1
;
auto
mx309
=
mm
->
add_instruction
(
convolution309
,
mx308
,
mx201
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference310
;
batch_norm_inference310
.
epsilon
=
1e-05
;
batch_norm_inference310
.
momentum
=
0.9
;
auto
mx310
=
mm
->
add_instruction
(
batch_norm_inference310
,
mx309
,
mx200
,
mx199
,
mx198
,
mx197
);
migraphx
::
op
::
convolution
convolution311
;
convolution311
.
padding
=
{
0
,
0
};
convolution311
.
stride
=
{
2
,
2
};
convolution311
.
dilation
=
{
1
,
1
};
convolution311
.
group
=
1
;
auto
mx311
=
mm
->
add_instruction
(
convolution311
,
mx302
,
mx196
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference312
;
batch_norm_inference312
.
epsilon
=
1e-05
;
batch_norm_inference312
.
momentum
=
0.9
;
auto
mx312
=
mm
->
add_instruction
(
batch_norm_inference312
,
mx311
,
mx195
,
mx194
,
mx193
,
mx192
);
migraphx
::
op
::
add
add313
;
auto
mx313
=
mm
->
add_instruction
(
add313
,
mx310
,
mx312
);
migraphx
::
op
::
relu
relu314
;
auto
mx314
=
mm
->
add_instruction
(
relu314
,
mx313
);
migraphx
::
op
::
convolution
convolution315
;
convolution315
.
padding
=
{
0
,
0
};
convolution315
.
stride
=
{
1
,
1
};
convolution315
.
dilation
=
{
1
,
1
};
convolution315
.
group
=
1
;
auto
mx315
=
mm
->
add_instruction
(
convolution315
,
mx314
,
mx191
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference316
;
batch_norm_inference316
.
epsilon
=
1e-05
;
batch_norm_inference316
.
momentum
=
0.9
;
auto
mx316
=
mm
->
add_instruction
(
batch_norm_inference316
,
mx315
,
mx190
,
mx189
,
mx188
,
mx187
);
migraphx
::
op
::
relu
relu317
;
auto
mx317
=
mm
->
add_instruction
(
relu317
,
mx316
);
migraphx
::
op
::
convolution
convolution318
;
convolution318
.
padding
=
{
1
,
1
};
convolution318
.
stride
=
{
1
,
1
};
convolution318
.
dilation
=
{
1
,
1
};
convolution318
.
group
=
1
;
auto
mx318
=
mm
->
add_instruction
(
convolution318
,
mx317
,
mx186
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference319
;
batch_norm_inference319
.
epsilon
=
1e-05
;
batch_norm_inference319
.
momentum
=
0.9
;
auto
mx319
=
mm
->
add_instruction
(
batch_norm_inference319
,
mx318
,
mx185
,
mx184
,
mx183
,
mx182
);
migraphx
::
op
::
relu
relu320
;
auto
mx320
=
mm
->
add_instruction
(
relu320
,
mx319
);
migraphx
::
op
::
convolution
convolution321
;
convolution321
.
padding
=
{
0
,
0
};
convolution321
.
stride
=
{
1
,
1
};
convolution321
.
dilation
=
{
1
,
1
};
convolution321
.
group
=
1
;
auto
mx321
=
mm
->
add_instruction
(
convolution321
,
mx320
,
mx181
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference322
;
batch_norm_inference322
.
epsilon
=
1e-05
;
batch_norm_inference322
.
momentum
=
0.9
;
auto
mx322
=
mm
->
add_instruction
(
batch_norm_inference322
,
mx321
,
mx180
,
mx179
,
mx178
,
mx177
);
migraphx
::
op
::
add
add323
;
auto
mx323
=
mm
->
add_instruction
(
add323
,
mx322
,
mx314
);
migraphx
::
op
::
relu
relu324
;
auto
mx324
=
mm
->
add_instruction
(
relu324
,
mx323
);
migraphx
::
op
::
convolution
convolution325
;
convolution325
.
padding
=
{
0
,
0
};
convolution325
.
stride
=
{
1
,
1
};
convolution325
.
dilation
=
{
1
,
1
};
convolution325
.
group
=
1
;
auto
mx325
=
mm
->
add_instruction
(
convolution325
,
mx324
,
mx176
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference326
;
batch_norm_inference326
.
epsilon
=
1e-05
;
batch_norm_inference326
.
momentum
=
0.9
;
auto
mx326
=
mm
->
add_instruction
(
batch_norm_inference326
,
mx325
,
mx175
,
mx174
,
mx173
,
mx172
);
migraphx
::
op
::
relu
relu327
;
auto
mx327
=
mm
->
add_instruction
(
relu327
,
mx326
);
migraphx
::
op
::
convolution
convolution328
;
convolution328
.
padding
=
{
1
,
1
};
convolution328
.
stride
=
{
1
,
1
};
convolution328
.
dilation
=
{
1
,
1
};
convolution328
.
group
=
1
;
auto
mx328
=
mm
->
add_instruction
(
convolution328
,
mx327
,
mx171
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference329
;
batch_norm_inference329
.
epsilon
=
1e-05
;
batch_norm_inference329
.
momentum
=
0.9
;
auto
mx329
=
mm
->
add_instruction
(
batch_norm_inference329
,
mx328
,
mx170
,
mx169
,
mx168
,
mx167
);
migraphx
::
op
::
relu
relu330
;
auto
mx330
=
mm
->
add_instruction
(
relu330
,
mx329
);
migraphx
::
op
::
convolution
convolution331
;
convolution331
.
padding
=
{
0
,
0
};
convolution331
.
stride
=
{
1
,
1
};
convolution331
.
dilation
=
{
1
,
1
};
convolution331
.
group
=
1
;
auto
mx331
=
mm
->
add_instruction
(
convolution331
,
mx330
,
mx166
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference332
;
batch_norm_inference332
.
epsilon
=
1e-05
;
batch_norm_inference332
.
momentum
=
0.9
;
auto
mx332
=
mm
->
add_instruction
(
batch_norm_inference332
,
mx331
,
mx165
,
mx164
,
mx163
,
mx162
);
migraphx
::
op
::
add
add333
;
auto
mx333
=
mm
->
add_instruction
(
add333
,
mx332
,
mx324
);
migraphx
::
op
::
relu
relu334
;
auto
mx334
=
mm
->
add_instruction
(
relu334
,
mx333
);
migraphx
::
op
::
convolution
convolution335
;
convolution335
.
padding
=
{
0
,
0
};
convolution335
.
stride
=
{
1
,
1
};
convolution335
.
dilation
=
{
1
,
1
};
convolution335
.
group
=
1
;
auto
mx335
=
mm
->
add_instruction
(
convolution335
,
mx334
,
mx161
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference336
;
batch_norm_inference336
.
epsilon
=
1e-05
;
batch_norm_inference336
.
momentum
=
0.9
;
auto
mx336
=
mm
->
add_instruction
(
batch_norm_inference336
,
mx335
,
mx160
,
mx159
,
mx158
,
mx157
);
migraphx
::
op
::
relu
relu337
;
auto
mx337
=
mm
->
add_instruction
(
relu337
,
mx336
);
migraphx
::
op
::
convolution
convolution338
;
convolution338
.
padding
=
{
1
,
1
};
convolution338
.
stride
=
{
1
,
1
};
convolution338
.
dilation
=
{
1
,
1
};
convolution338
.
group
=
1
;
auto
mx338
=
mm
->
add_instruction
(
convolution338
,
mx337
,
mx156
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference339
;
batch_norm_inference339
.
epsilon
=
1e-05
;
batch_norm_inference339
.
momentum
=
0.9
;
auto
mx339
=
mm
->
add_instruction
(
batch_norm_inference339
,
mx338
,
mx155
,
mx154
,
mx153
,
mx152
);
migraphx
::
op
::
relu
relu340
;
auto
mx340
=
mm
->
add_instruction
(
relu340
,
mx339
);
migraphx
::
op
::
convolution
convolution341
;
convolution341
.
padding
=
{
0
,
0
};
convolution341
.
stride
=
{
1
,
1
};
convolution341
.
dilation
=
{
1
,
1
};
convolution341
.
group
=
1
;
auto
mx341
=
mm
->
add_instruction
(
convolution341
,
mx340
,
mx151
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference342
;
batch_norm_inference342
.
epsilon
=
1e-05
;
batch_norm_inference342
.
momentum
=
0.9
;
auto
mx342
=
mm
->
add_instruction
(
batch_norm_inference342
,
mx341
,
mx150
,
mx149
,
mx148
,
mx147
);
migraphx
::
op
::
add
add343
;
auto
mx343
=
mm
->
add_instruction
(
add343
,
mx342
,
mx334
);
migraphx
::
op
::
relu
relu344
;
auto
mx344
=
mm
->
add_instruction
(
relu344
,
mx343
);
migraphx
::
op
::
convolution
convolution345
;
convolution345
.
padding
=
{
0
,
0
};
convolution345
.
stride
=
{
1
,
1
};
convolution345
.
dilation
=
{
1
,
1
};
convolution345
.
group
=
1
;
auto
mx345
=
mm
->
add_instruction
(
convolution345
,
mx344
,
mx146
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference346
;
batch_norm_inference346
.
epsilon
=
1e-05
;
batch_norm_inference346
.
momentum
=
0.9
;
auto
mx346
=
mm
->
add_instruction
(
batch_norm_inference346
,
mx345
,
mx145
,
mx144
,
mx143
,
mx142
);
migraphx
::
op
::
relu
relu347
;
auto
mx347
=
mm
->
add_instruction
(
relu347
,
mx346
);
migraphx
::
op
::
convolution
convolution348
;
convolution348
.
padding
=
{
1
,
1
};
convolution348
.
stride
=
{
2
,
2
};
convolution348
.
dilation
=
{
1
,
1
};
convolution348
.
group
=
1
;
auto
mx348
=
mm
->
add_instruction
(
convolution348
,
mx347
,
mx141
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference349
;
batch_norm_inference349
.
epsilon
=
1e-05
;
batch_norm_inference349
.
momentum
=
0.9
;
auto
mx349
=
mm
->
add_instruction
(
batch_norm_inference349
,
mx348
,
mx140
,
mx139
,
mx138
,
mx137
);
migraphx
::
op
::
relu
relu350
;
auto
mx350
=
mm
->
add_instruction
(
relu350
,
mx349
);
migraphx
::
op
::
convolution
convolution351
;
convolution351
.
padding
=
{
0
,
0
};
convolution351
.
stride
=
{
1
,
1
};
convolution351
.
dilation
=
{
1
,
1
};
convolution351
.
group
=
1
;
auto
mx351
=
mm
->
add_instruction
(
convolution351
,
mx350
,
mx136
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference352
;
batch_norm_inference352
.
epsilon
=
1e-05
;
batch_norm_inference352
.
momentum
=
0.9
;
auto
mx352
=
mm
->
add_instruction
(
batch_norm_inference352
,
mx351
,
mx135
,
mx134
,
mx133
,
mx132
);
migraphx
::
op
::
convolution
convolution353
;
convolution353
.
padding
=
{
0
,
0
};
convolution353
.
stride
=
{
2
,
2
};
convolution353
.
dilation
=
{
1
,
1
};
convolution353
.
group
=
1
;
auto
mx353
=
mm
->
add_instruction
(
convolution353
,
mx344
,
mx131
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference354
;
batch_norm_inference354
.
epsilon
=
1e-05
;
batch_norm_inference354
.
momentum
=
0.9
;
auto
mx354
=
mm
->
add_instruction
(
batch_norm_inference354
,
mx353
,
mx130
,
mx129
,
mx128
,
mx127
);
migraphx
::
op
::
add
add355
;
auto
mx355
=
mm
->
add_instruction
(
add355
,
mx352
,
mx354
);
migraphx
::
op
::
relu
relu356
;
auto
mx356
=
mm
->
add_instruction
(
relu356
,
mx355
);
migraphx
::
op
::
convolution
convolution357
;
convolution357
.
padding
=
{
0
,
0
};
convolution357
.
stride
=
{
1
,
1
};
convolution357
.
dilation
=
{
1
,
1
};
convolution357
.
group
=
1
;
auto
mx357
=
mm
->
add_instruction
(
convolution357
,
mx356
,
mx126
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference358
;
batch_norm_inference358
.
epsilon
=
1e-05
;
batch_norm_inference358
.
momentum
=
0.9
;
auto
mx358
=
mm
->
add_instruction
(
batch_norm_inference358
,
mx357
,
mx125
,
mx124
,
mx123
,
mx122
);
migraphx
::
op
::
relu
relu359
;
auto
mx359
=
mm
->
add_instruction
(
relu359
,
mx358
);
migraphx
::
op
::
convolution
convolution360
;
convolution360
.
padding
=
{
1
,
1
};
convolution360
.
stride
=
{
1
,
1
};
convolution360
.
dilation
=
{
1
,
1
};
convolution360
.
group
=
1
;
auto
mx360
=
mm
->
add_instruction
(
convolution360
,
mx359
,
mx121
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference361
;
batch_norm_inference361
.
epsilon
=
1e-05
;
batch_norm_inference361
.
momentum
=
0.9
;
auto
mx361
=
mm
->
add_instruction
(
batch_norm_inference361
,
mx360
,
mx120
,
mx119
,
mx118
,
mx117
);
migraphx
::
op
::
relu
relu362
;
auto
mx362
=
mm
->
add_instruction
(
relu362
,
mx361
);
migraphx
::
op
::
convolution
convolution363
;
convolution363
.
padding
=
{
0
,
0
};
convolution363
.
stride
=
{
1
,
1
};
convolution363
.
dilation
=
{
1
,
1
};
convolution363
.
group
=
1
;
auto
mx363
=
mm
->
add_instruction
(
convolution363
,
mx362
,
mx116
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference364
;
batch_norm_inference364
.
epsilon
=
1e-05
;
batch_norm_inference364
.
momentum
=
0.9
;
auto
mx364
=
mm
->
add_instruction
(
batch_norm_inference364
,
mx363
,
mx115
,
mx114
,
mx113
,
mx112
);
migraphx
::
op
::
add
add365
;
auto
mx365
=
mm
->
add_instruction
(
add365
,
mx364
,
mx356
);
migraphx
::
op
::
relu
relu366
;
auto
mx366
=
mm
->
add_instruction
(
relu366
,
mx365
);
migraphx
::
op
::
convolution
convolution367
;
convolution367
.
padding
=
{
0
,
0
};
convolution367
.
stride
=
{
1
,
1
};
convolution367
.
dilation
=
{
1
,
1
};
convolution367
.
group
=
1
;
auto
mx367
=
mm
->
add_instruction
(
convolution367
,
mx366
,
mx111
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference368
;
batch_norm_inference368
.
epsilon
=
1e-05
;
batch_norm_inference368
.
momentum
=
0.9
;
auto
mx368
=
mm
->
add_instruction
(
batch_norm_inference368
,
mx367
,
mx110
,
mx109
,
mx108
,
mx107
);
migraphx
::
op
::
relu
relu369
;
auto
mx369
=
mm
->
add_instruction
(
relu369
,
mx368
);
migraphx
::
op
::
convolution
convolution370
;
convolution370
.
padding
=
{
1
,
1
};
convolution370
.
stride
=
{
1
,
1
};
convolution370
.
dilation
=
{
1
,
1
};
convolution370
.
group
=
1
;
auto
mx370
=
mm
->
add_instruction
(
convolution370
,
mx369
,
mx106
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference371
;
batch_norm_inference371
.
epsilon
=
1e-05
;
batch_norm_inference371
.
momentum
=
0.9
;
auto
mx371
=
mm
->
add_instruction
(
batch_norm_inference371
,
mx370
,
mx105
,
mx104
,
mx103
,
mx102
);
migraphx
::
op
::
relu
relu372
;
auto
mx372
=
mm
->
add_instruction
(
relu372
,
mx371
);
migraphx
::
op
::
convolution
convolution373
;
convolution373
.
padding
=
{
0
,
0
};
convolution373
.
stride
=
{
1
,
1
};
convolution373
.
dilation
=
{
1
,
1
};
convolution373
.
group
=
1
;
auto
mx373
=
mm
->
add_instruction
(
convolution373
,
mx372
,
mx101
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference374
;
batch_norm_inference374
.
epsilon
=
1e-05
;
batch_norm_inference374
.
momentum
=
0.9
;
auto
mx374
=
mm
->
add_instruction
(
batch_norm_inference374
,
mx373
,
mx100
,
mx99
,
mx98
,
mx97
);
migraphx
::
op
::
add
add375
;
auto
mx375
=
mm
->
add_instruction
(
add375
,
mx374
,
mx366
);
migraphx
::
op
::
relu
relu376
;
auto
mx376
=
mm
->
add_instruction
(
relu376
,
mx375
);
migraphx
::
op
::
convolution
convolution377
;
convolution377
.
padding
=
{
0
,
0
};
convolution377
.
stride
=
{
1
,
1
};
convolution377
.
dilation
=
{
1
,
1
};
convolution377
.
group
=
1
;
auto
mx377
=
mm
->
add_instruction
(
convolution377
,
mx376
,
mx96
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference378
;
batch_norm_inference378
.
epsilon
=
1e-05
;
batch_norm_inference378
.
momentum
=
0.9
;
auto
mx378
=
mm
->
add_instruction
(
batch_norm_inference378
,
mx377
,
mx95
,
mx94
,
mx93
,
mx92
);
migraphx
::
op
::
relu
relu379
;
auto
mx379
=
mm
->
add_instruction
(
relu379
,
mx378
);
migraphx
::
op
::
convolution
convolution380
;
convolution380
.
padding
=
{
1
,
1
};
convolution380
.
stride
=
{
1
,
1
};
convolution380
.
dilation
=
{
1
,
1
};
convolution380
.
group
=
1
;
auto
mx380
=
mm
->
add_instruction
(
convolution380
,
mx379
,
mx91
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference381
;
batch_norm_inference381
.
epsilon
=
1e-05
;
batch_norm_inference381
.
momentum
=
0.9
;
auto
mx381
=
mm
->
add_instruction
(
batch_norm_inference381
,
mx380
,
mx90
,
mx89
,
mx88
,
mx87
);
migraphx
::
op
::
relu
relu382
;
auto
mx382
=
mm
->
add_instruction
(
relu382
,
mx381
);
migraphx
::
op
::
convolution
convolution383
;
convolution383
.
padding
=
{
0
,
0
};
convolution383
.
stride
=
{
1
,
1
};
convolution383
.
dilation
=
{
1
,
1
};
convolution383
.
group
=
1
;
auto
mx383
=
mm
->
add_instruction
(
convolution383
,
mx382
,
mx86
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference384
;
batch_norm_inference384
.
epsilon
=
1e-05
;
batch_norm_inference384
.
momentum
=
0.9
;
auto
mx384
=
mm
->
add_instruction
(
batch_norm_inference384
,
mx383
,
mx85
,
mx84
,
mx83
,
mx82
);
migraphx
::
op
::
add
add385
;
auto
mx385
=
mm
->
add_instruction
(
add385
,
mx384
,
mx376
);
migraphx
::
op
::
relu
relu386
;
auto
mx386
=
mm
->
add_instruction
(
relu386
,
mx385
);
migraphx
::
op
::
convolution
convolution387
;
convolution387
.
padding
=
{
0
,
0
};
convolution387
.
stride
=
{
1
,
1
};
convolution387
.
dilation
=
{
1
,
1
};
convolution387
.
group
=
1
;
auto
mx387
=
mm
->
add_instruction
(
convolution387
,
mx386
,
mx81
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference388
;
batch_norm_inference388
.
epsilon
=
1e-05
;
batch_norm_inference388
.
momentum
=
0.9
;
auto
mx388
=
mm
->
add_instruction
(
batch_norm_inference388
,
mx387
,
mx80
,
mx79
,
mx78
,
mx77
);
migraphx
::
op
::
relu
relu389
;
auto
mx389
=
mm
->
add_instruction
(
relu389
,
mx388
);
migraphx
::
op
::
convolution
convolution390
;
convolution390
.
padding
=
{
1
,
1
};
convolution390
.
stride
=
{
1
,
1
};
convolution390
.
dilation
=
{
1
,
1
};
convolution390
.
group
=
1
;
auto
mx390
=
mm
->
add_instruction
(
convolution390
,
mx389
,
mx76
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference391
;
batch_norm_inference391
.
epsilon
=
1e-05
;
batch_norm_inference391
.
momentum
=
0.9
;
auto
mx391
=
mm
->
add_instruction
(
batch_norm_inference391
,
mx390
,
mx75
,
mx74
,
mx73
,
mx72
);
migraphx
::
op
::
relu
relu392
;
auto
mx392
=
mm
->
add_instruction
(
relu392
,
mx391
);
migraphx
::
op
::
convolution
convolution393
;
convolution393
.
padding
=
{
0
,
0
};
convolution393
.
stride
=
{
1
,
1
};
convolution393
.
dilation
=
{
1
,
1
};
convolution393
.
group
=
1
;
auto
mx393
=
mm
->
add_instruction
(
convolution393
,
mx392
,
mx71
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference394
;
batch_norm_inference394
.
epsilon
=
1e-05
;
batch_norm_inference394
.
momentum
=
0.9
;
auto
mx394
=
mm
->
add_instruction
(
batch_norm_inference394
,
mx393
,
mx70
,
mx69
,
mx68
,
mx67
);
migraphx
::
op
::
add
add395
;
auto
mx395
=
mm
->
add_instruction
(
add395
,
mx394
,
mx386
);
migraphx
::
op
::
relu
relu396
;
auto
mx396
=
mm
->
add_instruction
(
relu396
,
mx395
);
migraphx
::
op
::
convolution
convolution397
;
convolution397
.
padding
=
{
0
,
0
};
convolution397
.
stride
=
{
1
,
1
};
convolution397
.
dilation
=
{
1
,
1
};
convolution397
.
group
=
1
;
auto
mx397
=
mm
->
add_instruction
(
convolution397
,
mx396
,
mx66
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference398
;
batch_norm_inference398
.
epsilon
=
1e-05
;
batch_norm_inference398
.
momentum
=
0.9
;
auto
mx398
=
mm
->
add_instruction
(
batch_norm_inference398
,
mx397
,
mx65
,
mx64
,
mx63
,
mx62
);
migraphx
::
op
::
relu
relu399
;
auto
mx399
=
mm
->
add_instruction
(
relu399
,
mx398
);
migraphx
::
op
::
convolution
convolution400
;
convolution400
.
padding
=
{
1
,
1
};
convolution400
.
stride
=
{
1
,
1
};
convolution400
.
dilation
=
{
1
,
1
};
convolution400
.
group
=
1
;
auto
mx400
=
mm
->
add_instruction
(
convolution400
,
mx399
,
mx61
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference401
;
batch_norm_inference401
.
epsilon
=
1e-05
;
batch_norm_inference401
.
momentum
=
0.9
;
auto
mx401
=
mm
->
add_instruction
(
batch_norm_inference401
,
mx400
,
mx60
,
mx59
,
mx58
,
mx57
);
migraphx
::
op
::
relu
relu402
;
auto
mx402
=
mm
->
add_instruction
(
relu402
,
mx401
);
migraphx
::
op
::
convolution
convolution403
;
convolution403
.
padding
=
{
0
,
0
};
convolution403
.
stride
=
{
1
,
1
};
convolution403
.
dilation
=
{
1
,
1
};
convolution403
.
group
=
1
;
auto
mx403
=
mm
->
add_instruction
(
convolution403
,
mx402
,
mx56
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference404
;
batch_norm_inference404
.
epsilon
=
1e-05
;
batch_norm_inference404
.
momentum
=
0.9
;
auto
mx404
=
mm
->
add_instruction
(
batch_norm_inference404
,
mx403
,
mx55
,
mx54
,
mx53
,
mx52
);
migraphx
::
op
::
add
add405
;
auto
mx405
=
mm
->
add_instruction
(
add405
,
mx404
,
mx396
);
migraphx
::
op
::
relu
relu406
;
auto
mx406
=
mm
->
add_instruction
(
relu406
,
mx405
);
migraphx
::
op
::
convolution
convolution407
;
convolution407
.
padding
=
{
0
,
0
};
convolution407
.
stride
=
{
1
,
1
};
convolution407
.
dilation
=
{
1
,
1
};
convolution407
.
group
=
1
;
auto
mx407
=
mm
->
add_instruction
(
convolution407
,
mx406
,
mx51
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference408
;
batch_norm_inference408
.
epsilon
=
1e-05
;
batch_norm_inference408
.
momentum
=
0.9
;
auto
mx408
=
mm
->
add_instruction
(
batch_norm_inference408
,
mx407
,
mx50
,
mx49
,
mx48
,
mx47
);
migraphx
::
op
::
relu
relu409
;
auto
mx409
=
mm
->
add_instruction
(
relu409
,
mx408
);
migraphx
::
op
::
convolution
convolution410
;
convolution410
.
padding
=
{
1
,
1
};
convolution410
.
stride
=
{
2
,
2
};
convolution410
.
dilation
=
{
1
,
1
};
convolution410
.
group
=
1
;
auto
mx410
=
mm
->
add_instruction
(
convolution410
,
mx409
,
mx46
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference411
;
batch_norm_inference411
.
epsilon
=
1e-05
;
batch_norm_inference411
.
momentum
=
0.9
;
auto
mx411
=
mm
->
add_instruction
(
batch_norm_inference411
,
mx410
,
mx45
,
mx44
,
mx43
,
mx42
);
migraphx
::
op
::
relu
relu412
;
auto
mx412
=
mm
->
add_instruction
(
relu412
,
mx411
);
migraphx
::
op
::
convolution
convolution413
;
convolution413
.
padding
=
{
0
,
0
};
convolution413
.
stride
=
{
1
,
1
};
convolution413
.
dilation
=
{
1
,
1
};
convolution413
.
group
=
1
;
auto
mx413
=
mm
->
add_instruction
(
convolution413
,
mx412
,
mx41
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference414
;
batch_norm_inference414
.
epsilon
=
1e-05
;
batch_norm_inference414
.
momentum
=
0.9
;
auto
mx414
=
mm
->
add_instruction
(
batch_norm_inference414
,
mx413
,
mx40
,
mx39
,
mx38
,
mx37
);
migraphx
::
op
::
convolution
convolution415
;
convolution415
.
padding
=
{
0
,
0
};
convolution415
.
stride
=
{
2
,
2
};
convolution415
.
dilation
=
{
1
,
1
};
convolution415
.
group
=
1
;
auto
mx415
=
mm
->
add_instruction
(
convolution415
,
mx406
,
mx36
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference416
;
batch_norm_inference416
.
epsilon
=
1e-05
;
batch_norm_inference416
.
momentum
=
0.9
;
auto
mx416
=
mm
->
add_instruction
(
batch_norm_inference416
,
mx415
,
mx35
,
mx34
,
mx33
,
mx32
);
migraphx
::
op
::
add
add417
;
auto
mx417
=
mm
->
add_instruction
(
add417
,
mx414
,
mx416
);
migraphx
::
op
::
relu
relu418
;
auto
mx418
=
mm
->
add_instruction
(
relu418
,
mx417
);
migraphx
::
op
::
convolution
convolution419
;
convolution419
.
padding
=
{
0
,
0
};
convolution419
.
stride
=
{
1
,
1
};
convolution419
.
dilation
=
{
1
,
1
};
convolution419
.
group
=
1
;
auto
mx419
=
mm
->
add_instruction
(
convolution419
,
mx418
,
mx31
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference420
;
batch_norm_inference420
.
epsilon
=
1e-05
;
batch_norm_inference420
.
momentum
=
0.9
;
auto
mx420
=
mm
->
add_instruction
(
batch_norm_inference420
,
mx419
,
mx30
,
mx29
,
mx28
,
mx27
);
migraphx
::
op
::
relu
relu421
;
auto
mx421
=
mm
->
add_instruction
(
relu421
,
mx420
);
migraphx
::
op
::
convolution
convolution422
;
convolution422
.
padding
=
{
1
,
1
};
convolution422
.
stride
=
{
1
,
1
};
convolution422
.
dilation
=
{
1
,
1
};
convolution422
.
group
=
1
;
auto
mx422
=
mm
->
add_instruction
(
convolution422
,
mx421
,
mx26
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference423
;
batch_norm_inference423
.
epsilon
=
1e-05
;
batch_norm_inference423
.
momentum
=
0.9
;
auto
mx423
=
mm
->
add_instruction
(
batch_norm_inference423
,
mx422
,
mx25
,
mx24
,
mx23
,
mx22
);
migraphx
::
op
::
relu
relu424
;
auto
mx424
=
mm
->
add_instruction
(
relu424
,
mx423
);
migraphx
::
op
::
convolution
convolution425
;
convolution425
.
padding
=
{
0
,
0
};
convolution425
.
stride
=
{
1
,
1
};
convolution425
.
dilation
=
{
1
,
1
};
convolution425
.
group
=
1
;
auto
mx425
=
mm
->
add_instruction
(
convolution425
,
mx424
,
mx21
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference426
;
batch_norm_inference426
.
epsilon
=
1e-05
;
batch_norm_inference426
.
momentum
=
0.9
;
auto
mx426
=
mm
->
add_instruction
(
batch_norm_inference426
,
mx425
,
mx20
,
mx19
,
mx18
,
mx17
);
migraphx
::
op
::
add
add427
;
auto
mx427
=
mm
->
add_instruction
(
add427
,
mx426
,
mx418
);
migraphx
::
op
::
relu
relu428
;
auto
mx428
=
mm
->
add_instruction
(
relu428
,
mx427
);
migraphx
::
op
::
convolution
convolution429
;
convolution429
.
padding
=
{
0
,
0
};
convolution429
.
stride
=
{
1
,
1
};
convolution429
.
dilation
=
{
1
,
1
};
convolution429
.
group
=
1
;
auto
mx429
=
mm
->
add_instruction
(
convolution429
,
mx428
,
mx16
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference430
;
batch_norm_inference430
.
epsilon
=
1e-05
;
batch_norm_inference430
.
momentum
=
0.9
;
auto
mx430
=
mm
->
add_instruction
(
batch_norm_inference430
,
mx429
,
mx15
,
mx14
,
mx13
,
mx12
);
migraphx
::
op
::
relu
relu431
;
auto
mx431
=
mm
->
add_instruction
(
relu431
,
mx430
);
migraphx
::
op
::
convolution
convolution432
;
convolution432
.
padding
=
{
1
,
1
};
convolution432
.
stride
=
{
1
,
1
};
convolution432
.
dilation
=
{
1
,
1
};
convolution432
.
group
=
1
;
auto
mx432
=
mm
->
add_instruction
(
convolution432
,
mx431
,
mx11
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference433
;
batch_norm_inference433
.
epsilon
=
1e-05
;
batch_norm_inference433
.
momentum
=
0.9
;
auto
mx433
=
mm
->
add_instruction
(
batch_norm_inference433
,
mx432
,
mx10
,
mx9
,
mx8
,
mx7
);
migraphx
::
op
::
relu
relu434
;
auto
mx434
=
mm
->
add_instruction
(
relu434
,
mx433
);
migraphx
::
op
::
convolution
convolution435
;
convolution435
.
padding
=
{
0
,
0
};
convolution435
.
stride
=
{
1
,
1
};
convolution435
.
dilation
=
{
1
,
1
};
convolution435
.
group
=
1
;
auto
mx435
=
mm
->
add_instruction
(
convolution435
,
mx434
,
mx6
);
migraphx
::
op
::
batch_norm_inference
batch_norm_inference436
;
batch_norm_inference436
.
epsilon
=
1e-05
;
batch_norm_inference436
.
momentum
=
0.9
;
auto
mx436
=
mm
->
add_instruction
(
batch_norm_inference436
,
mx435
,
mx5
,
mx4
,
mx3
,
mx2
);
migraphx
::
op
::
add
add437
;
auto
mx437
=
mm
->
add_instruction
(
add437
,
mx436
,
mx428
);
migraphx
::
op
::
relu
relu438
;
auto
mx438
=
mm
->
add_instruction
(
relu438
,
mx437
);
migraphx
::
op
::
pooling
pooling439
;
pooling439
.
mode
=
migraphx
::
op
::
pooling_mode
::
average
;
pooling439
.
padding
=
{
0
,
0
};
pooling439
.
stride
=
{
1
,
1
};
pooling439
.
lengths
=
{
7
,
7
};
auto
mx439
=
mm
->
add_instruction
(
pooling439
,
mx438
);
migraphx
::
op
::
flatten
flatten440
;
flatten440
.
axis
=
1
;
auto
mx440
=
mm
->
add_instruction
(
flatten440
,
mx439
);
migraphx
::
op
::
transpose
transpose441
;
transpose441
.
dims
=
{
1
,
0
};
auto
mx441
=
mm
->
add_instruction
(
transpose441
,
mx1
);
migraphx
::
op
::
multibroadcast
multibroadcast442
;
multibroadcast442
.
output_lens
=
{
batch
,
1000
};
auto
mx442
=
mm
->
add_instruction
(
multibroadcast442
,
mx0
);
float
dot443_alpha
=
1
;
float
dot443_beta
=
1
;
migraphx
::
add_apply_alpha_beta
(
*
mm
,
{
mx440
,
mx441
,
mx442
},
migraphx
::
make_op
(
"dot"
),
dot443_alpha
,
dot443_beta
);
auto
x_main_module_95
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
94
));
auto
x_main_module_96
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
95
));
auto
x_main_module_97
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
96
));
auto
x_main_module_98
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
97
));
auto
x_main_module_99
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
256
,
1
,
1
}},
98
));
auto
x_main_module_100
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
99
));
auto
x_main_module_101
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
100
));
auto
x_main_module_102
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
}},
101
));
auto
x_main_module_103
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
256
,
64
,
1
,
1
}},
102
));
auto
x_main_module_104
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
103
));
auto
x_main_module_105
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
3
,
3
}},
104
));
auto
x_main_module_106
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
105
));
auto
x_main_module_107
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
64
,
1
,
1
}},
106
));
auto
x_main_module_108
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
}},
107
));
auto
x_main_module_109
=
mmain
->
add_literal
(
migraphx
::
generate_literal
(
migraphx
::
shape
{
migraphx
::
shape
::
float_type
,
{
64
,
3
,
7
,
7
}},
108
));
auto
x_main_module_110
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[3,3,3,3],padding_mode:0,stride:[2,2]}"
)),
x_input_1
,
x_main_module_109
);
auto
x_main_module_111
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,112,112]}"
)),
x_main_module_108
);
auto
x_main_module_112
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_110
,
x_main_module_111
);
auto
x_main_module_113
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_112
);
auto
x_main_module_114
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"pooling"
,
migraphx
::
from_json_string
(
"{ceil_mode:0,lengths:[3,3],lp_order:2,mode:1,padding:[1,1,1,1],stride:[2,2]}"
)),
x_main_module_113
);
auto
x_main_module_115
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_114
,
x_main_module_107
);
auto
x_main_module_116
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_106
);
auto
x_main_module_117
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_115
,
x_main_module_116
);
auto
x_main_module_118
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_117
);
auto
x_main_module_119
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_118
,
x_main_module_105
);
auto
x_main_module_120
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_104
);
auto
x_main_module_121
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_119
,
x_main_module_120
);
auto
x_main_module_122
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_121
);
auto
x_main_module_123
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_122
,
x_main_module_103
);
auto
x_main_module_124
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,56,56]}"
)),
x_main_module_102
);
auto
x_main_module_125
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_123
,
x_main_module_124
);
auto
x_main_module_126
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_114
,
x_main_module_101
);
auto
x_main_module_127
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,56,56]}"
)),
x_main_module_100
);
auto
x_main_module_128
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_126
,
x_main_module_127
);
auto
x_main_module_129
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_125
,
x_main_module_128
);
auto
x_main_module_130
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_129
);
auto
x_main_module_131
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_130
,
x_main_module_99
);
auto
x_main_module_132
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_98
);
auto
x_main_module_133
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_131
,
x_main_module_132
);
auto
x_main_module_134
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_133
);
auto
x_main_module_135
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_134
,
x_main_module_97
);
auto
x_main_module_136
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_96
);
auto
x_main_module_137
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_135
,
x_main_module_136
);
auto
x_main_module_138
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_137
);
auto
x_main_module_139
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_138
,
x_main_module_95
);
auto
x_main_module_140
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,56,56]}"
)),
x_main_module_94
);
auto
x_main_module_141
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_139
,
x_main_module_140
);
auto
x_main_module_142
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_141
,
x_main_module_130
);
auto
x_main_module_143
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_142
);
auto
x_main_module_144
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_143
,
x_main_module_93
);
auto
x_main_module_145
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_92
);
auto
x_main_module_146
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_144
,
x_main_module_145
);
auto
x_main_module_147
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_146
);
auto
x_main_module_148
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_147
,
x_main_module_91
);
auto
x_main_module_149
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,64,56,56]}"
)),
x_main_module_90
);
auto
x_main_module_150
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_148
,
x_main_module_149
);
auto
x_main_module_151
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_150
);
auto
x_main_module_152
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_151
,
x_main_module_89
);
auto
x_main_module_153
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,56,56]}"
)),
x_main_module_88
);
auto
x_main_module_154
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_152
,
x_main_module_153
);
auto
x_main_module_155
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_154
,
x_main_module_143
);
auto
x_main_module_156
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_155
);
auto
x_main_module_157
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_156
,
x_main_module_87
);
auto
x_main_module_158
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,56,56]}"
)),
x_main_module_86
);
auto
x_main_module_159
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_157
,
x_main_module_158
);
auto
x_main_module_160
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_159
);
auto
x_main_module_161
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[2,2]}"
)),
x_main_module_160
,
x_main_module_85
);
auto
x_main_module_162
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_84
);
auto
x_main_module_163
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_161
,
x_main_module_162
);
auto
x_main_module_164
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_163
);
auto
x_main_module_165
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_164
,
x_main_module_83
);
auto
x_main_module_166
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,28,28]}"
)),
x_main_module_82
);
auto
x_main_module_167
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_165
,
x_main_module_166
);
auto
x_main_module_168
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[2,2]}"
)),
x_main_module_156
,
x_main_module_81
);
auto
x_main_module_169
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,28,28]}"
)),
x_main_module_80
);
auto
x_main_module_170
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_168
,
x_main_module_169
);
auto
x_main_module_171
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_167
,
x_main_module_170
);
auto
x_main_module_172
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_171
);
auto
x_main_module_173
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_172
,
x_main_module_79
);
auto
x_main_module_174
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_78
);
auto
x_main_module_175
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_173
,
x_main_module_174
);
auto
x_main_module_176
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_175
);
auto
x_main_module_177
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_176
,
x_main_module_77
);
auto
x_main_module_178
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_76
);
auto
x_main_module_179
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_177
,
x_main_module_178
);
auto
x_main_module_180
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_179
);
auto
x_main_module_181
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_180
,
x_main_module_75
);
auto
x_main_module_182
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,28,28]}"
)),
x_main_module_74
);
auto
x_main_module_183
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_181
,
x_main_module_182
);
auto
x_main_module_184
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_183
,
x_main_module_172
);
auto
x_main_module_185
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_184
);
auto
x_main_module_186
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_185
,
x_main_module_73
);
auto
x_main_module_187
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_72
);
auto
x_main_module_188
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_186
,
x_main_module_187
);
auto
x_main_module_189
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_188
);
auto
x_main_module_190
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_189
,
x_main_module_71
);
auto
x_main_module_191
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_70
);
auto
x_main_module_192
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_190
,
x_main_module_191
);
auto
x_main_module_193
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_192
);
auto
x_main_module_194
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_193
,
x_main_module_69
);
auto
x_main_module_195
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,28,28]}"
)),
x_main_module_68
);
auto
x_main_module_196
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_194
,
x_main_module_195
);
auto
x_main_module_197
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_196
,
x_main_module_185
);
auto
x_main_module_198
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_197
);
auto
x_main_module_199
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_198
,
x_main_module_67
);
auto
x_main_module_200
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_66
);
auto
x_main_module_201
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_199
,
x_main_module_200
);
auto
x_main_module_202
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_201
);
auto
x_main_module_203
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_202
,
x_main_module_65
);
auto
x_main_module_204
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,128,28,28]}"
)),
x_main_module_64
);
auto
x_main_module_205
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_203
,
x_main_module_204
);
auto
x_main_module_206
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_205
);
auto
x_main_module_207
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_206
,
x_main_module_63
);
auto
x_main_module_208
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,28,28]}"
)),
x_main_module_62
);
auto
x_main_module_209
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_207
,
x_main_module_208
);
auto
x_main_module_210
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_209
,
x_main_module_198
);
auto
x_main_module_211
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_210
);
auto
x_main_module_212
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_211
,
x_main_module_61
);
auto
x_main_module_213
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,28,28]}"
)),
x_main_module_60
);
auto
x_main_module_214
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_212
,
x_main_module_213
);
auto
x_main_module_215
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_214
);
auto
x_main_module_216
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[2,2]}"
)),
x_main_module_215
,
x_main_module_59
);
auto
x_main_module_217
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_58
);
auto
x_main_module_218
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_216
,
x_main_module_217
);
auto
x_main_module_219
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_218
);
auto
x_main_module_220
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_219
,
x_main_module_57
);
auto
x_main_module_221
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_56
);
auto
x_main_module_222
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_220
,
x_main_module_221
);
auto
x_main_module_223
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[2,2]}"
)),
x_main_module_211
,
x_main_module_55
);
auto
x_main_module_224
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_54
);
auto
x_main_module_225
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_223
,
x_main_module_224
);
auto
x_main_module_226
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_222
,
x_main_module_225
);
auto
x_main_module_227
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_226
);
auto
x_main_module_228
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_227
,
x_main_module_53
);
auto
x_main_module_229
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_52
);
auto
x_main_module_230
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_228
,
x_main_module_229
);
auto
x_main_module_231
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_230
);
auto
x_main_module_232
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_231
,
x_main_module_51
);
auto
x_main_module_233
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_50
);
auto
x_main_module_234
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_232
,
x_main_module_233
);
auto
x_main_module_235
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_234
);
auto
x_main_module_236
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_235
,
x_main_module_49
);
auto
x_main_module_237
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_48
);
auto
x_main_module_238
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_236
,
x_main_module_237
);
auto
x_main_module_239
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_238
,
x_main_module_227
);
auto
x_main_module_240
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_239
);
auto
x_main_module_241
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_240
,
x_main_module_47
);
auto
x_main_module_242
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_46
);
auto
x_main_module_243
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_241
,
x_main_module_242
);
auto
x_main_module_244
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_243
);
auto
x_main_module_245
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_244
,
x_main_module_45
);
auto
x_main_module_246
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_44
);
auto
x_main_module_247
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_245
,
x_main_module_246
);
auto
x_main_module_248
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_247
);
auto
x_main_module_249
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_248
,
x_main_module_43
);
auto
x_main_module_250
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_42
);
auto
x_main_module_251
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_249
,
x_main_module_250
);
auto
x_main_module_252
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_251
,
x_main_module_240
);
auto
x_main_module_253
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_252
);
auto
x_main_module_254
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_253
,
x_main_module_41
);
auto
x_main_module_255
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_40
);
auto
x_main_module_256
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_254
,
x_main_module_255
);
auto
x_main_module_257
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_256
);
auto
x_main_module_258
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_257
,
x_main_module_39
);
auto
x_main_module_259
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_38
);
auto
x_main_module_260
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_258
,
x_main_module_259
);
auto
x_main_module_261
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_260
);
auto
x_main_module_262
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_261
,
x_main_module_37
);
auto
x_main_module_263
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_36
);
auto
x_main_module_264
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_262
,
x_main_module_263
);
auto
x_main_module_265
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_264
,
x_main_module_253
);
auto
x_main_module_266
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_265
);
auto
x_main_module_267
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_266
,
x_main_module_35
);
auto
x_main_module_268
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_34
);
auto
x_main_module_269
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_267
,
x_main_module_268
);
auto
x_main_module_270
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_269
);
auto
x_main_module_271
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_270
,
x_main_module_33
);
auto
x_main_module_272
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_32
);
auto
x_main_module_273
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_271
,
x_main_module_272
);
auto
x_main_module_274
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_273
);
auto
x_main_module_275
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_274
,
x_main_module_31
);
auto
x_main_module_276
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_30
);
auto
x_main_module_277
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_275
,
x_main_module_276
);
auto
x_main_module_278
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_277
,
x_main_module_266
);
auto
x_main_module_279
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_278
);
auto
x_main_module_280
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_279
,
x_main_module_29
);
auto
x_main_module_281
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_28
);
auto
x_main_module_282
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_280
,
x_main_module_281
);
auto
x_main_module_283
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_282
);
auto
x_main_module_284
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_283
,
x_main_module_27
);
auto
x_main_module_285
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,256,14,14]}"
)),
x_main_module_26
);
auto
x_main_module_286
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_284
,
x_main_module_285
);
auto
x_main_module_287
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_286
);
auto
x_main_module_288
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_287
,
x_main_module_25
);
auto
x_main_module_289
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,1024,14,14]}"
)),
x_main_module_24
);
auto
x_main_module_290
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_288
,
x_main_module_289
);
auto
x_main_module_291
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_290
,
x_main_module_279
);
auto
x_main_module_292
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_291
);
auto
x_main_module_293
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_292
,
x_main_module_23
);
auto
x_main_module_294
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,14,14]}"
)),
x_main_module_22
);
auto
x_main_module_295
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_293
,
x_main_module_294
);
auto
x_main_module_296
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_295
);
auto
x_main_module_297
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[2,2]}"
)),
x_main_module_296
,
x_main_module_21
);
auto
x_main_module_298
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,7,7]}"
)),
x_main_module_20
);
auto
x_main_module_299
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_297
,
x_main_module_298
);
auto
x_main_module_300
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_299
);
auto
x_main_module_301
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_300
,
x_main_module_19
);
auto
x_main_module_302
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,2048,7,7]}"
)),
x_main_module_18
);
auto
x_main_module_303
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_301
,
x_main_module_302
);
auto
x_main_module_304
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[2,2]}"
)),
x_main_module_292
,
x_main_module_17
);
auto
x_main_module_305
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,2048,7,7]}"
)),
x_main_module_16
);
auto
x_main_module_306
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_304
,
x_main_module_305
);
auto
x_main_module_307
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_303
,
x_main_module_306
);
auto
x_main_module_308
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_307
);
auto
x_main_module_309
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_308
,
x_main_module_15
);
auto
x_main_module_310
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,7,7]}"
)),
x_main_module_14
);
auto
x_main_module_311
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_309
,
x_main_module_310
);
auto
x_main_module_312
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_311
);
auto
x_main_module_313
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_312
,
x_main_module_13
);
auto
x_main_module_314
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,7,7]}"
)),
x_main_module_12
);
auto
x_main_module_315
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_313
,
x_main_module_314
);
auto
x_main_module_316
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_315
);
auto
x_main_module_317
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_316
,
x_main_module_11
);
auto
x_main_module_318
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,2048,7,7]}"
)),
x_main_module_10
);
auto
x_main_module_319
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_317
,
x_main_module_318
);
auto
x_main_module_320
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_319
,
x_main_module_308
);
auto
x_main_module_321
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_320
);
auto
x_main_module_322
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_321
,
x_main_module_9
);
auto
x_main_module_323
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,7,7]}"
)),
x_main_module_8
);
auto
x_main_module_324
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_322
,
x_main_module_323
);
auto
x_main_module_325
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_324
);
auto
x_main_module_326
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[1,1,1,1],padding_mode:0,stride:[1,1]}"
)),
x_main_module_325
,
x_main_module_7
);
auto
x_main_module_327
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,512,7,7]}"
)),
x_main_module_6
);
auto
x_main_module_328
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_326
,
x_main_module_327
);
auto
x_main_module_329
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_328
);
auto
x_main_module_330
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"convolution"
,
migraphx
::
from_json_string
(
"{dilation:[1,1],group:1,padding:[0,0,0,0],padding_mode:0,stride:[1,1]}"
)),
x_main_module_329
,
x_main_module_5
);
auto
x_main_module_331
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"broadcast"
,
migraphx
::
from_json_string
(
"{axis:1,out_lens:[1,2048,7,7]}"
)),
x_main_module_4
);
auto
x_main_module_332
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_330
,
x_main_module_331
);
auto
x_main_module_333
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_332
,
x_main_module_321
);
auto
x_main_module_334
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"relu"
),
x_main_module_333
);
auto
x_main_module_335
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"pooling"
,
migraphx
::
from_json_string
(
"{ceil_mode:0,lengths:[7,7],lp_order:2,mode:0,padding:[0,0,0,0],stride:[1,1]}"
)),
x_main_module_334
);
auto
x_main_module_336
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"reshape"
,
migraphx
::
from_json_string
(
"{dims:[1,-1]}"
)),
x_main_module_335
);
auto
x_main_module_337
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
migraphx
::
from_json_string
(
"{permutation:[1,0]}"
)),
x_main_module_2
);
auto
x_main_module_338
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"dot"
),
x_main_module_336
,
x_main_module_337
);
auto
x_main_module_339
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,1000]}"
)),
x_main_module_3
);
auto
x_main_module_340
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"multibroadcast"
,
migraphx
::
from_json_string
(
"{out_lens:[1,1000]}"
)),
x_main_module_0
);
auto
x_main_module_341
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"mul"
),
x_main_module_339
,
x_main_module_340
);
auto
x_main_module_342
=
mmain
->
add_instruction
(
migraphx
::
make_op
(
"add"
),
x_main_module_338
,
x_main_module_341
);
mmain
->
add_return
({
x_main_module_342
});
return
p
;
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace driver
}
// namespace migraphx
src/fuse_pointwise.cpp
View file @
9b3b10ed
...
...
@@ -142,7 +142,7 @@ static std::vector<instruction_ref> append_pointwise_module(instruction_ref ins,
input_map
[
input
]
=
map_ins
[
param
];
}
}
pm
->
replace_return
(
pm
->
insert_
module_
instructions
(
last
,
xm
,
map_ins
));
pm
->
replace_return
(
pm
->
insert_instructions
(
last
,
xm
,
map_ins
));
return
inputs
;
}
...
...
src/include/migraphx/iota_iterator.hpp
View file @
9b3b10ed
...
...
@@ -81,8 +81,9 @@ struct basic_iota_iterator
index
--
;
return
it
;
}
// TODO: operator->
reference
operator
*
()
const
{
return
f
(
index
);
}
pointer
operator
->
()
const
{
return
&
f
(
index
);
}
reference
operator
[](
int
n
)
const
{
return
f
(
index
+
n
);
}
};
template
<
class
T
,
class
F
>
...
...
src/include/migraphx/module.hpp
View file @
9b3b10ed
...
...
@@ -120,9 +120,33 @@ struct module
instruction_ref
move_instructions
(
instruction_ref
src
,
instruction_ref
dst
);
std
::
vector
<
instruction_ref
>
insert_module_instructions
(
instruction_ref
ins
,
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
add_instructions
(
const
std
::
vector
<
instruction_ref
>&
instructions
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
std
::
vector
<
instruction_ref
>
add_instructions
(
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
std
::
vector
<
instruction_ref
>
add_instructions
(
instruction_ref
start
,
instruction_ref
last
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
std
::
vector
<
instruction_ref
>
insert_instructions
(
instruction_ref
ins
,
const
std
::
vector
<
instruction_ref
>&
instructions
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
std
::
vector
<
instruction_ref
>
insert_instructions
(
instruction_ref
ins
,
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
std
::
vector
<
instruction_ref
>
insert_instructions
(
instruction_ref
ins
,
instruction_ref
start
,
instruction_ref
last
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
=
{});
template
<
class
...
Ts
>
instruction_ref
add_literal
(
Ts
&&
...
xs
)
...
...
@@ -179,7 +203,9 @@ struct module
void
print_cpp
(
std
::
ostream
&
os
)
const
;
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
print_cpp
(
std
::
ostream
&
os
,
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
names
)
const
;
print_cpp
(
std
::
ostream
&
os
,
const
std
::
string
&
mname
,
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
names
)
const
;
void
annotate
(
std
::
ostream
&
os
,
std
::
function
<
void
(
instruction_ref
)
>
a
)
const
;
...
...
src/include/migraphx/op/nonmaxsuppression.hpp
View file @
9b3b10ed
...
...
@@ -56,14 +56,21 @@ struct nonmaxsuppression
shape
compute_shape
(
std
::
vector
<
shape
>
inputs
)
const
{
// requires at least 2 inputs
check_shapes
{
inputs
,
*
this
}.
standard
();
check_shapes
{{
inputs
.
at
(
0
),
inputs
.
at
(
1
)},
*
this
}.
only_dims
(
3
);
auto
lens
=
inputs
.
front
().
lens
();
// check input shape
if
(
lens
[
1
]
!=
inputs
.
at
(
1
).
lens
()[
2
])
{
MIGRAPHX_THROW
(
"NonMaxSuppression: dimension mismatch between first and second input!"
);
MIGRAPHX_THROW
(
"NonMaxSuppression: spatial dimension mismatch between boxes and scores input"
);
}
// check batch sizes
if
(
lens
[
0
]
!=
inputs
.
at
(
1
).
lens
()[
0
])
{
MIGRAPHX_THROW
(
"NonMaxSuppression: number of batches mismatch between boxes and scores input"
);
}
std
::
vector
<
int64_t
>
out_lens
(
2
);
...
...
@@ -74,8 +81,8 @@ struct nonmaxsuppression
struct
box
{
std
::
array
<
float
,
2
>
x
;
std
::
array
<
float
,
2
>
y
;
std
::
array
<
double
,
2
>
x
;
std
::
array
<
double
,
2
>
y
;
void
sort
()
{
...
...
@@ -83,9 +90,9 @@ struct nonmaxsuppression
std
::
sort
(
y
.
begin
(),
y
.
end
());
}
std
::
array
<
float
,
2
>&
operator
[](
std
::
size_t
i
)
{
return
i
==
0
?
x
:
y
;
}
std
::
array
<
double
,
2
>&
operator
[](
std
::
size_t
i
)
{
return
i
==
0
?
x
:
y
;
}
float
area
()
const
double
area
()
const
{
assert
(
std
::
is_sorted
(
x
.
begin
(),
x
.
end
()));
assert
(
std
::
is_sorted
(
y
.
begin
(),
y
.
end
()));
...
...
@@ -94,29 +101,29 @@ struct nonmaxsuppression
};
template
<
class
T
>
box
batch_box
(
const
T
*
boxes
,
std
::
size_t
bidx
)
const
box
batch_box
(
T
boxes
,
std
::
size_t
b
ox_
idx
)
const
{
box
result
{};
const
T
*
start
=
boxes
+
4
*
bidx
;
auto
start
=
boxes
+
4
*
b
ox_
idx
;
if
(
center_point_box
)
{
float
half_width
=
start
[
2
]
/
2.0
f
;
float
half_height
=
start
[
3
]
/
2.0
f
;
float
x_center
=
start
[
0
];
float
y_center
=
start
[
1
];
result
.
x
=
{
x_center
-
half_width
,
x_center
+
half_width
};
result
.
y
=
{
y_center
-
half_height
,
y_center
+
half_height
};
double
half_width
=
start
[
2
]
/
2.0
;
double
half_height
=
start
[
3
]
/
2.0
;
double
x_center
=
start
[
0
];
double
y_center
=
start
[
1
];
result
.
x
=
{
x_center
-
half_width
,
x_center
+
half_width
};
result
.
y
=
{
y_center
-
half_height
,
y_center
+
half_height
};
}
else
{
result
.
x
=
{
start
[
1
],
start
[
3
]};
result
.
y
=
{
start
[
0
],
start
[
2
]};
result
.
x
=
{
static_cast
<
double
>
(
start
[
1
]
)
,
static_cast
<
double
>
(
start
[
3
]
)
};
result
.
y
=
{
static_cast
<
double
>
(
start
[
0
]
)
,
static_cast
<
double
>
(
start
[
2
]
)
};
}
return
result
;
}
inline
bool
suppress_by_iou
(
box
b1
,
box
b2
,
float
iou_threshold
)
const
inline
bool
suppress_by_iou
(
box
b1
,
box
b2
,
double
iou_threshold
)
const
{
b1
.
sort
();
b2
.
sort
();
...
...
@@ -128,7 +135,7 @@ struct nonmaxsuppression
intersection
[
i
][
1
]
=
std
::
min
(
b1
[
i
][
1
],
b2
[
i
][
1
]);
}
std
::
vector
<
std
::
array
<
float
,
2
>>
bbox
=
{
intersection
.
x
,
intersection
.
y
};
std
::
vector
<
std
::
array
<
double
,
2
>>
bbox
=
{
intersection
.
x
,
intersection
.
y
};
if
(
std
::
any_of
(
bbox
.
begin
(),
bbox
.
end
(),
[](
auto
bx
)
{
return
not
std
::
is_sorted
(
bx
.
begin
(),
bx
.
end
());
}))
...
...
@@ -136,115 +143,124 @@ struct nonmaxsuppression
return
false
;
}
const
float
area1
=
b1
.
area
();
const
float
area2
=
b2
.
area
();
const
float
intersection_area
=
intersection
.
area
();
const
float
union_area
=
area1
+
area2
-
intersection_area
;
const
double
area1
=
b1
.
area
();
const
double
area2
=
b2
.
area
();
const
double
intersection_area
=
intersection
.
area
();
const
double
union_area
=
area1
+
area2
-
intersection_area
;
if
(
area1
<=
.0
f
or
area2
<=
.0
f
or
union_area
<=
.0
f
)
{
return
false
;
}
const
float
intersection_over_union
=
intersection_area
/
union_area
;
const
double
intersection_over_union
=
intersection_area
/
union_area
;
return
intersection_over_union
>
iou_threshold
;
}
argument
compute
(
const
shape
&
output_shape
,
std
::
vector
<
argument
>
args
)
const
// filter boxes below score_threshold
template
<
class
T
>
std
::
priority_queue
<
std
::
pair
<
double
,
int64_t
>>
filter_boxes_by_score
(
T
scores_start
,
std
::
size_t
num_boxes
,
double
score_threshold
)
const
{
argument
result
{
output_shape
};
result
.
visit
([
&
](
auto
out
)
{
std
::
fill
(
out
.
begin
(),
out
.
end
(),
0
);
});
std
::
size_t
max_output_boxes_per_class
=
0
;
float
iou_threshold
=
0.0
f
;
float
score_threshold
=
0.0
f
;
if
(
args
.
size
()
>
2
)
{
max_output_boxes_per_class
=
args
.
at
(
2
).
at
<
std
::
size_t
>
();
}
// max_output_boxes_per_class is 0, no output
if
(
max_output_boxes_per_class
==
0
)
{
return
result
;
}
if
(
args
.
size
()
>
3
)
{
iou_threshold
=
args
.
at
(
3
).
at
<
float
>
();
}
if
(
args
.
size
()
>
4
)
{
score_threshold
=
args
.
at
(
4
).
at
<
float
>
();
}
const
auto
&
lens
=
args
.
at
(
1
).
get_shape
().
lens
();
auto
batch_num
=
lens
[
0
];
auto
class_num
=
lens
[
1
];
auto
box_num
=
args
.
at
(
0
).
get_shape
().
lens
()[
1
];
std
::
priority_queue
<
std
::
pair
<
double
,
int64_t
>>
boxes_heap
;
auto
insert_to_boxes_heap
=
make_function_output_iterator
([
&
](
const
auto
&
x
)
{
boxes_heap
.
push
(
x
);
});
int64_t
box_idx
=
0
;
transform_if
(
scores_start
,
scores_start
+
num_boxes
,
insert_to_boxes_heap
,
[
&
](
auto
sc
)
{
box_idx
++
;
return
sc
>=
score_threshold
;
},
[
&
](
auto
sc
)
{
return
std
::
make_pair
(
sc
,
box_idx
-
1
);
});
return
boxes_heap
;
}
std
::
vector
<
std
::
pair
<
float
,
int64_t
>>
selected_boxes_inside_class
;
template
<
class
Output
,
class
Boxes
,
class
Scores
>
void
compute_nms
(
Output
output
,
Boxes
boxes
,
Scores
scores
,
const
shape
&
output_shape
,
std
::
size_t
max_output_boxes_per_class
,
double
iou_threshold
,
double
score_threshold
)
const
{
std
::
fill
(
output
.
begin
(),
output
.
end
(),
0
);
const
auto
&
lens
=
scores
.
get_shape
().
lens
();
const
auto
num_batches
=
lens
[
0
];
const
auto
num_classes
=
lens
[
1
];
const
auto
num_boxes
=
lens
[
2
];
// boxes of a class with NMS applied [score, index]
std
::
vector
<
std
::
pair
<
double
,
int64_t
>>
selected_boxes_inside_class
;
std
::
vector
<
int64_t
>
selected_indices
;
selected_boxes_inside_class
.
reserve
(
output_shape
.
elements
());
auto
scores
=
make_view
<
float
>
(
args
.
at
(
1
).
get_shape
(),
args
.
at
(
1
).
cast
<
float
>
());
const
float
*
boxes
=
args
.
at
(
0
).
cast
<
float
>
();
shape
comp_s
{
shape
::
float_type
,
{
batch_num
,
class_num
}};
// iterate over batches and classes
shape
comp_s
{
shape
::
double_type
,
{
num_batches
,
num_classes
}};
shape_for_each
(
comp_s
,
[
&
](
auto
idx
)
{
auto
bidx
=
idx
[
0
];
auto
cidx
=
idx
[
1
];
std
::
size_t
score_offset
=
(
bidx
*
class_num
+
cidx
)
*
box_num
;
const
float
*
batch_boxes
=
boxes
+
bidx
*
box_num
*
4
;
std
::
priority_queue
<
std
::
pair
<
float
,
int64_t
>>
sorted_boxes
;
auto
insert_to_sorted_boxes
=
make_function_output_iterator
([
&
](
const
auto
&
x
)
{
sorted_boxes
.
push
(
x
);
});
int64_t
box_idx
=
0
;
transform_if
(
scores
.
begin
()
+
score_offset
,
scores
.
begin
()
+
score_offset
+
box_num
,
insert_to_sorted_boxes
,
[
&
](
auto
sc
)
{
box_idx
++
;
return
sc
>=
score_threshold
;
},
[
&
](
auto
sc
)
{
return
std
::
make_pair
(
sc
,
box_idx
-
1
);
});
auto
batch_idx
=
idx
[
0
];
auto
class_idx
=
idx
[
1
];
// index offset for this class
auto
scores_start
=
scores
.
begin
()
+
(
batch_idx
*
num_classes
+
class_idx
)
*
num_boxes
;
// iterator to first value of this batch
auto
batch_boxes_start
=
boxes
.
begin
()
+
batch_idx
*
num_boxes
*
4
;
auto
boxes_heap
=
filter_boxes_by_score
(
scores_start
,
num_boxes
,
score_threshold
);
selected_boxes_inside_class
.
clear
();
// Get the next box with top score, filter by iou_threshold
while
(
!
sorted_
boxes
.
empty
()
&&
while
(
!
boxes
_heap
.
empty
()
&&
selected_boxes_inside_class
.
size
()
<
max_output_boxes_per_class
)
{
const
std
::
pair
<
float
,
int64_t
>&
next_top_score
=
sorted_boxes
.
top
();
// Check with existing selected boxes for this class, suppress if exceed the IOU
// (Intersection Over Union) threshold
bool
not_selected
=
std
::
any_of
(
selected_boxes_inside_class
.
begin
(),
selected_boxes_inside_class
.
end
(),
[
&
](
auto
selected_index
)
{
return
this
->
suppress_by_iou
(
batch_box
(
batch_boxes
,
next_top_score
.
second
),
batch_box
(
batch_boxes
,
selected_index
.
second
),
iou_threshold
);
});
// Check with existing selected boxes for this class, remove box if it
// exceeds the IOU (Intersection Over Union) threshold
const
auto
next_top_score
=
boxes_heap
.
top
();
bool
not_selected
=
std
::
any_of
(
selected_boxes_inside_class
.
begin
(),
selected_boxes_inside_class
.
end
(),
[
&
](
auto
selected_index
)
{
return
this
->
suppress_by_iou
(
batch_box
(
batch_boxes
_start
,
next_top_score
.
second
),
batch_box
(
batch_boxes
_start
,
selected_index
.
second
),
iou_threshold
);
});
if
(
not
not_selected
)
{
selected_boxes_inside_class
.
push_back
(
next_top_score
);
selected_indices
.
push_back
(
bidx
);
selected_indices
.
push_back
(
cidx
);
selected_indices
.
push_back
(
b
atch_
idx
);
selected_indices
.
push_back
(
c
lass_
idx
);
selected_indices
.
push_back
(
next_top_score
.
second
);
}
sorted_
boxes
.
pop
();
boxes
_heap
.
pop
();
}
});
std
::
copy
(
selected_indices
.
begin
(),
selected_indices
.
end
(),
output
.
begin
());
}
argument
compute
(
const
shape
&
output_shape
,
std
::
vector
<
argument
>
args
)
const
{
argument
result
{
output_shape
};
result
.
visit
([
&
](
auto
out
)
{
std
::
copy
(
selected_indices
.
begin
(),
selected_indices
.
end
(),
out
.
begin
());
std
::
size_t
max_output_boxes_per_class
=
(
args
.
size
()
>
2
)
?
(
args
.
at
(
2
).
at
<
std
::
size_t
>
())
:
0
;
if
(
max_output_boxes_per_class
==
0
)
{
return
result
;
}
double
iou_threshold
=
(
args
.
size
()
>
3
)
?
(
args
.
at
(
3
).
at
<
double
>
())
:
0.0
f
;
double
score_threshold
=
(
args
.
size
()
>
4
)
?
(
args
.
at
(
4
).
at
<
double
>
())
:
0.0
f
;
result
.
visit
([
&
](
auto
output
)
{
visit_all
(
args
[
0
],
args
[
1
])([
&
](
auto
boxes
,
auto
scores
)
{
compute_nms
(
output
,
boxes
,
scores
,
output_shape
,
max_output_boxes_per_class
,
iou_threshold
,
score_threshold
);
});
});
return
result
;
...
...
src/include/migraphx/stringutils.hpp
View file @
9b3b10ed
...
...
@@ -44,8 +44,8 @@ auto with_char(F f)
return
[
=
](
unsigned
char
c
)
->
bool
{
return
f
(
c
);
};
}
inline
std
::
string
replace_string
(
std
::
string
subject
,
const
std
::
string
&
search
,
const
std
::
string
&
replace
)
inline
void
replace_string
_inplace
(
std
::
string
&
subject
,
const
std
::
string
&
search
,
const
std
::
string
&
replace
)
{
size_t
pos
=
0
;
while
((
pos
=
subject
.
find
(
search
,
pos
))
!=
std
::
string
::
npos
)
...
...
@@ -53,6 +53,12 @@ replace_string(std::string subject, const std::string& search, const std::string
subject
.
replace
(
pos
,
search
.
length
(),
replace
);
pos
+=
replace
.
length
();
}
}
inline
std
::
string
replace_string
(
std
::
string
subject
,
const
std
::
string
&
search
,
const
std
::
string
&
replace
)
{
replace_string_inplace
(
subject
,
search
,
replace
);
return
subject
;
}
...
...
src/inline_module.cpp
View file @
9b3b10ed
...
...
@@ -35,7 +35,7 @@ static void inline_submodule(module& m, instruction_ref ins, bool cond)
{
const
auto
&
mod_inputs
=
ins
->
module_inputs
();
module_ref
smod
=
cond
?
mod_inputs
.
at
(
0
)
:
mod_inputs
.
at
(
1
);
auto
mod_outputs
=
m
.
insert_
module_
instructions
(
ins
,
smod
);
auto
mod_outputs
=
m
.
insert_instructions
(
ins
,
smod
);
auto
ins_outputs
=
ins
->
outputs
();
assert
(
mod_outputs
.
size
()
>=
ins_outputs
.
size
());
...
...
src/module.cpp
View file @
9b3b10ed
...
...
@@ -35,6 +35,7 @@
#include <migraphx/make_op.hpp>
#include <migraphx/register_target.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/json.hpp>
#include <iostream>
#include <sstream>
#include <algorithm>
...
...
@@ -196,6 +197,62 @@ void module::assign(const module& m)
}
}
template
<
class
Range
>
static
std
::
vector
<
instruction_ref
>
insert_generic_instructions
(
module
&
m
,
instruction_ref
ins
,
Range
&&
instructions
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
assert
(
m
.
has_instruction
(
ins
)
or
is_end
(
ins
,
m
.
end
()));
std
::
vector
<
instruction_ref
>
mod_outputs
;
instruction_ref
last
;
for
(
instruction_ref
sins
:
instructions
)
{
last
=
sins
;
if
(
contains
(
map_ins
,
sins
))
continue
;
instruction_ref
copy_ins
;
if
(
sins
->
name
()
==
"@literal"
)
{
auto
l
=
sins
->
get_literal
();
copy_ins
=
m
.
add_literal
(
l
);
}
else
if
(
sins
->
name
()
==
"@param"
)
{
auto
&&
name
=
any_cast
<
builtin
::
param
>
(
sins
->
get_operator
()).
parameter
;
auto
s
=
sins
->
get_shape
();
copy_ins
=
m
.
add_parameter
(
name
,
s
);
}
else
if
(
sins
->
name
()
==
"@outline"
)
{
auto
s
=
sins
->
get_shape
();
copy_ins
=
m
.
add_outline
(
s
);
}
else
{
auto
mod_args
=
sins
->
module_inputs
();
auto
inputs
=
sins
->
inputs
();
std
::
vector
<
instruction_ref
>
copy_inputs
(
inputs
.
size
());
std
::
transform
(
inputs
.
begin
(),
inputs
.
end
(),
copy_inputs
.
begin
(),
[
&
](
auto
i
)
{
return
contains
(
map_ins
,
i
)
?
map_ins
[
i
]
:
i
;
});
if
(
sins
->
name
()
==
"@return"
)
{
mod_outputs
=
copy_inputs
;
break
;
}
copy_ins
=
m
.
insert_instruction
(
ins
,
sins
->
get_operator
(),
copy_inputs
,
mod_args
);
}
map_ins
[
sins
]
=
copy_ins
;
}
if
(
mod_outputs
.
empty
()
and
instructions
.
begin
()
!=
instructions
.
end
())
mod_outputs
=
{
map_ins
.
at
(
last
)};
return
mod_outputs
;
}
instruction_ref
module
::
add_instruction
(
const
operation
&
op
,
std
::
vector
<
instruction_ref
>
args
)
{
return
insert_instruction
(
impl
->
instructions
.
end
(),
op
,
std
::
move
(
args
));
...
...
@@ -335,54 +392,51 @@ instruction_ref module::move_instructions(instruction_ref src, instruction_ref d
}
std
::
vector
<
instruction_ref
>
module
::
insert_module_instructions
(
instruction_ref
ins
,
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
module
::
add_instructions
(
const
std
::
vector
<
instruction_ref
>&
instructions
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
std
::
vector
<
instruction_ref
>
mod_outputs
;
for
(
auto
sins
:
iterator_for
(
*
m
))
{
if
(
contains
(
map_ins
,
sins
))
continue
;
instruction_ref
copy_ins
;
if
(
sins
->
name
()
==
"@literal"
)
{
auto
l
=
sins
->
get_literal
();
copy_ins
=
this
->
add_literal
(
l
);
}
else
if
(
sins
->
name
()
==
"@param"
)
{
auto
&&
name
=
any_cast
<
builtin
::
param
>
(
sins
->
get_operator
()).
parameter
;
auto
s
=
sins
->
get_shape
();
copy_ins
=
this
->
add_parameter
(
name
,
s
);
}
else
if
(
sins
->
name
()
==
"@outline"
)
{
auto
s
=
sins
->
get_shape
();
copy_ins
=
this
->
add_outline
(
s
);
}
else
{
auto
mod_args
=
sins
->
module_inputs
();
auto
inputs
=
sins
->
inputs
();
std
::
vector
<
instruction_ref
>
copy_inputs
(
inputs
.
size
());
std
::
transform
(
inputs
.
begin
(),
inputs
.
end
(),
copy_inputs
.
begin
(),
[
&
](
auto
i
)
{
return
contains
(
map_ins
,
i
)
?
map_ins
[
i
]
:
i
;
});
return
this
->
insert_instructions
(
this
->
end
(),
instructions
,
std
::
move
(
map_ins
));
}
if
(
sins
->
name
()
==
"@return"
)
{
mod_outputs
=
copy_inputs
;
break
;
}
std
::
vector
<
instruction_ref
>
module
::
add_instructions
(
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
return
this
->
insert_instructions
(
this
->
end
(),
m
,
std
::
move
(
map_ins
));
}
copy_ins
=
this
->
insert_instruction
(
ins
,
sins
->
get_operator
(),
copy_inputs
,
mod_args
);
}
map_ins
[
sins
]
=
copy_ins
;
}
if
(
mod_outputs
.
empty
())
mod_outputs
=
{
map_ins
.
at
(
std
::
prev
(
m
->
end
()))};
return
mod_outputs
;
std
::
vector
<
instruction_ref
>
module
::
add_instructions
(
instruction_ref
start
,
instruction_ref
last
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
return
this
->
insert_instructions
(
this
->
end
(),
start
,
last
,
std
::
move
(
map_ins
));
}
std
::
vector
<
instruction_ref
>
module
::
insert_instructions
(
instruction_ref
ins
,
const
std
::
vector
<
instruction_ref
>&
instructions
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
return
insert_generic_instructions
(
*
this
,
ins
,
instructions
,
std
::
move
(
map_ins
));
}
std
::
vector
<
instruction_ref
>
module
::
insert_instructions
(
instruction_ref
ins
,
const_module_ref
m
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
return
insert_generic_instructions
(
*
this
,
ins
,
iterator_for
(
*
m
),
std
::
move
(
map_ins
));
}
std
::
vector
<
instruction_ref
>
module
::
insert_instructions
(
instruction_ref
ins
,
instruction_ref
start
,
instruction_ref
last
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>
map_ins
)
{
auto
r
=
range
(
start
,
last
);
return
insert_generic_instructions
(
*
this
,
ins
,
iterator_for
(
r
),
std
::
move
(
map_ins
));
}
instruction_ref
module
::
add_literal
(
literal
l
)
...
...
@@ -708,44 +762,33 @@ void module::print_graph(std::ostream& os, bool brief) const
os
<<
"}"
<<
std
::
endl
;
}
static
std
::
string
cpp_var_name
(
const
std
::
string
&
name
)
static
std
::
string
to_c_id
(
const
std
::
string
&
name
,
char
rep
=
'_'
)
{
return
"m"
+
replace_string
(
name
,
"@"
,
"x"
);
std
::
string
id
=
transform_string
(
name
,
[
&
](
auto
c
)
{
if
(
with_char
(
::
isalnum
)(
c
)
or
c
==
'_'
)
return
c
;
return
rep
;
});
while
(
contains
(
id
,
"__"
))
replace_string_inplace
(
id
,
"__"
,
"_"
);
return
id
;
}
static
std
::
string
cpp_
op_
var
(
const
std
::
string
&
name
,
instruction_ref
ins
)
static
std
::
string
cpp_var
_name
(
const
std
::
string
&
name
)
{
return
replace_string
(
name
,
"
@
"
,
ins
->
name
(
));
return
to_c_id
(
"x_"
+
replace_string
(
name
,
"
:
"
,
"_module_"
));
}
static
void
print_
op_attributes
(
std
::
ostream
&
os
,
const
std
::
string
&
name
,
const
operation
&
op
)
static
void
print_
make_op
(
std
::
ostream
&
os
,
const
operation
&
op
)
{
std
::
string
x
=
to_string
(
op
);
if
(
contains
(
x
,
"["
))
os
<<
"migraphx::make_op("
<<
enclose_name
(
op
.
name
());
auto
v
=
op
.
to_value
();
if
(
not
v
.
empty
())
{
auto
start
=
x
.
find
(
'['
);
auto
end
=
x
.
find
(
']'
);
std
::
string
attribute_text
=
x
.
substr
(
start
+
1
,
end
-
start
-
1
);
std
::
vector
<
std
::
string
>
attributes
;
for
(
auto
&&
attribute
:
split_string
(
attribute_text
,
','
))
{
if
(
contains
(
attribute
,
'='
))
attributes
.
push_back
(
attribute
);
else
attributes
.
back
()
+=
","
+
attribute
;
}
for
(
auto
&&
attribute
:
attributes
)
{
auto
p
=
split_string
(
attribute
,
'='
);
auto
key
=
p
.
front
();
auto
value
=
p
.
back
();
if
(
contains
({
"bn_mode"
,
"padding_mode"
},
key
))
continue
;
if
(
key
==
"mode"
)
value
=
enclose_name
(
trim
(
value
));
os
<<
name
<<
"."
<<
key
<<
" = "
<<
value
<<
";"
<<
std
::
endl
;
}
os
<<
", "
<<
"migraphx::from_json_string("
<<
enclose_name
(
to_json_string
(
v
))
<<
")"
;
}
os
<<
")"
;
}
static
void
print_cpp_shape
(
std
::
ostream
&
os
,
const
migraphx
::
shape
&
s
)
...
...
@@ -758,22 +801,25 @@ static void print_cpp_shape(std::ostream& os, const migraphx::shape& s)
}
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
module
::
print_cpp
(
std
::
ostream
&
os
,
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
names
)
const
module
::
print_cpp
(
std
::
ostream
&
os
,
const
std
::
string
&
mname
,
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
names
)
const
{
os
<<
"migraphx::module p;"
<<
std
::
endl
;
unsigned
long
seed
=
0
;
// cppcheck-suppress variableScope
unsigned
long
seed
=
names
.
size
();
auto
last
=
std
::
prev
(
this
->
end
());
names
=
this
->
print
(
[
&
](
auto
ins
,
auto
ins_names
)
{
auto
op
=
cpp_op_var
(
ins_names
.
at
(
ins
),
ins
)
;
if
(
ins
->
name
().
front
()
!=
'@'
)
{
os
<<
"migraphx::op::"
<<
ins
->
name
()
<<
" "
<<
op
<<
";"
<<
std
::
endl
;
print_op_attributes
(
os
,
op
,
ins
->
get_operator
()
);
}
os
<<
"auto "
<<
cpp_var_name
(
ins_names
.
at
(
ins
))
<<
" = "
;
std
::
vector
<
std
::
string
>
input_vars
;
std
::
transform
(
ins
->
inputs
().
begin
(),
ins
->
inputs
().
end
(),
std
::
back_inserter
(
input_vars
),
[
&
](
auto
input
)
{
return
cpp_var_name
(
ins_names
.
at
(
input
));
}
);
if
(
ins
!=
last
)
os
<<
"auto "
<<
cpp_var_name
(
ins_names
.
at
(
ins
))
<<
" = "
;
if
(
ins
->
name
()
==
"@literal"
)
{
os
<<
"p.
add_literal("
;
os
<<
mname
<<
"->
add_literal("
;
bool
use_abs
=
false
;
ins
->
get_literal
().
visit
([
&
](
auto
v
)
{
use_abs
=
std
::
none_of
(
v
.
begin
(),
v
.
end
(),
[](
auto
x
)
{
return
x
<
0
;
});
...
...
@@ -791,17 +837,22 @@ module::print_cpp(std::ostream& os, std::unordered_map<instruction_ref, std::str
else
if
(
ins
->
name
()
==
"@param"
)
{
std
::
string
name
=
any_cast
<
builtin
::
param
>
(
ins
->
get_operator
()).
parameter
;
os
<<
"p.
add_parameter("
<<
enclose_name
(
name
)
<<
","
;
os
<<
mname
<<
"->
add_parameter("
<<
enclose_name
(
name
)
<<
","
;
print_cpp_shape
(
os
,
ins
->
get_shape
());
os
<<
");"
<<
std
::
endl
;
}
else
if
(
ins
->
name
()
==
"@return"
)
{
os
<<
mname
<<
"->add_return({"
;
os
<<
join_strings
(
input_vars
,
", "
);
os
<<
"});"
<<
std
::
endl
;
}
else
{
os
<<
"p.add_instruction("
<<
op
;
for
(
auto
input
:
ins
->
inputs
())
{
os
<<
", "
<<
cpp_var_name
(
ins_names
.
at
(
input
));
}
assert
(
ins
->
name
().
front
()
!=
'@'
);
os
<<
mname
<<
"->add_instruction("
;
print_make_op
(
os
,
ins
->
get_operator
());
os
<<
", "
<<
join_strings
(
input_vars
,
", "
);
os
<<
");"
<<
std
::
endl
;
}
},
...
...
@@ -810,7 +861,7 @@ module::print_cpp(std::ostream& os, std::unordered_map<instruction_ref, std::str
return
names
;
}
void
module
::
print_cpp
(
std
::
ostream
&
os
)
const
{
this
->
print_cpp
(
os
,
{});
}
void
module
::
print_cpp
(
std
::
ostream
&
os
)
const
{
this
->
print_cpp
(
os
,
this
->
name
(),
{});
}
void
module
::
annotate
(
std
::
ostream
&
os
,
std
::
function
<
void
(
instruction_ref
)
>
a
)
const
{
...
...
src/program.cpp
View file @
9b3b10ed
...
...
@@ -790,10 +790,17 @@ void program::print_cpp(std::ostream& os) const
{
auto
vec_modules
=
this
->
get_modules
();
std
::
unordered_map
<
instruction_ref
,
std
::
string
>
names
;
os
<<
"migraphx::program p;
\n
"
;
for
(
auto
&
mod
:
vec_modules
)
{
os
<<
"module:
\"
"
<<
mod
->
name
()
<<
"
\"
"
<<
std
::
endl
;
names
=
mod
->
print_cpp
(
os
,
names
);
std
::
string
var_name
=
"m"
+
mod
->
name
();
os
<<
"migraphx::module_ref "
<<
var_name
<<
" = "
;
if
(
mod
->
name
()
==
"main"
)
os
<<
"p.get_main_module();"
;
else
os
<<
"p.create_module(
\"
"
<<
mod
->
name
()
<<
"
\"
);"
;
os
<<
std
::
endl
;
names
=
mod
->
print_cpp
(
os
,
var_name
,
names
);
os
<<
std
::
endl
;
}
}
...
...
src/targets/gpu/fuse_mlir.cpp
View file @
9b3b10ed
...
...
@@ -108,7 +108,7 @@ struct find_conv_pointwise
return
std
::
make_pair
(
pm
->
get_parameter
(
name
),
mm
->
add_parameter
(
name
,
input
->
get_shape
()));
});
mm
->
add_return
(
mm
->
insert_
module_
instructions
(
mm
->
end
(),
pm
,
param_map
));
mm
->
add_return
(
mm
->
insert_instructions
(
mm
->
end
(),
pm
,
param_map
));
std
::
vector
<
instruction_ref
>
inputs
;
std
::
copy_if
(
ins
->
inputs
().
begin
(),
...
...
test/gpu/mlir.cpp
View file @
9b3b10ed
...
...
@@ -132,7 +132,7 @@ migraphx::argument run_ref(migraphx::program p, const migraphx::parameter_map& i
bool
verify_mlir
(
const
migraphx
::
module
&
mmlir
)
{
migraphx
::
program
ref
;
ref
.
get_main_module
()
->
insert_
module_
instructions
(
ref
.
get_main_module
()
->
end
(),
&
mmlir
);
ref
.
get_main_module
()
->
insert_instructions
(
ref
.
get_main_module
()
->
end
(),
&
mmlir
);
auto
inputs
=
generate_params
(
ref
);
...
...
test/module_test.cpp
View file @
9b3b10ed
...
...
@@ -300,6 +300,96 @@ TEST_CASE(parameter_name_order)
EXPECT
(
param_names
==
names1
);
}
TEST_CASE
(
insert_instructions_module
)
{
migraphx
::
shape
s
{
migraphx
::
shape
::
int32_type
,
{
1
}};
migraphx
::
module
m1
(
"m1"
);
auto
x1
=
m1
.
add_parameter
(
"x1"
,
s
);
auto
sqrt
=
m1
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x1
});
m1
.
add_instruction
(
migraphx
::
make_op
(
"add"
),
{
sqrt
,
x1
});
migraphx
::
module
m2
(
"m2"
);
auto
x2
=
m2
.
add_parameter
(
"x2"
,
s
);
m2
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x2
});
m1
.
insert_instructions
(
sqrt
,
&
m2
,
{{
x2
,
x1
}});
EXPECT
(
std
::
prev
(
sqrt
)
->
name
()
==
"sqrt"
);
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"sqrt"
;
})
==
2
);
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"@param"
;
})
==
1
);
EXPECT
(
contains
(
m1
.
get_parameter_shapes
(),
"x1"
));
EXPECT
(
not
contains
(
m1
.
get_parameter_shapes
(),
"x2"
));
}
TEST_CASE
(
add_instructions_module
)
{
migraphx
::
shape
s
{
migraphx
::
shape
::
int32_type
,
{
1
}};
migraphx
::
module
m1
(
"m1"
);
auto
x1
=
m1
.
add_parameter
(
"x1"
,
s
);
m1
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x1
});
migraphx
::
module
m2
(
"m2"
);
auto
x2
=
m2
.
add_parameter
(
"x2"
,
s
);
m2
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x2
});
m1
.
add_instructions
(
&
m2
,
{{
x2
,
x1
}});
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"sqrt"
;
})
==
2
);
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"@param"
;
})
==
1
);
EXPECT
(
contains
(
m1
.
get_parameter_shapes
(),
"x1"
));
EXPECT
(
not
contains
(
m1
.
get_parameter_shapes
(),
"x2"
));
}
TEST_CASE
(
add_instructions_range
)
{
migraphx
::
shape
s
{
migraphx
::
shape
::
int32_type
,
{
1
}};
migraphx
::
module
m1
(
"m1"
);
auto
x1
=
m1
.
add_parameter
(
"x1"
,
s
);
m1
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x1
});
migraphx
::
module
m2
(
"m2"
);
auto
x2
=
m2
.
add_parameter
(
"x2"
,
s
);
auto
sqrt2
=
m2
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x2
});
m1
.
add_instructions
(
sqrt2
,
m2
.
end
(),
{{
x2
,
x1
}});
EXPECT
(
std
::
any_of
(
m1
.
begin
(),
m1
.
end
(),
[
&
](
auto
&&
ins
)
{
return
migraphx
::
contains
(
ins
.
inputs
(),
x1
);
}));
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"sqrt"
;
})
==
2
);
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"@param"
;
})
==
1
);
EXPECT
(
contains
(
m1
.
get_parameter_shapes
(),
"x1"
));
EXPECT
(
not
contains
(
m1
.
get_parameter_shapes
(),
"x2"
));
}
TEST_CASE
(
add_instructions_vector
)
{
migraphx
::
shape
s
{
migraphx
::
shape
::
int32_type
,
{
1
}};
migraphx
::
module
m1
(
"m1"
);
auto
x1
=
m1
.
add_parameter
(
"x1"
,
s
);
m1
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x1
});
migraphx
::
module
m2
(
"m2"
);
auto
x2
=
m2
.
add_parameter
(
"x2"
,
s
);
auto
sqrt2
=
m2
.
add_instruction
(
migraphx
::
make_op
(
"sqrt"
),
{
x2
});
m1
.
add_instructions
({
sqrt2
},
{{
x2
,
x1
}});
EXPECT
(
std
::
any_of
(
m1
.
begin
(),
m1
.
end
(),
[
&
](
auto
&&
ins
)
{
return
migraphx
::
contains
(
ins
.
inputs
(),
x1
);
}));
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"sqrt"
;
})
==
2
);
EXPECT
(
std
::
count_if
(
m1
.
begin
(),
m1
.
end
(),
[](
auto
&&
ins
)
{
return
ins
.
name
()
==
"@param"
;
})
==
1
);
EXPECT
(
contains
(
m1
.
get_parameter_shapes
(),
"x1"
));
EXPECT
(
not
contains
(
m1
.
get_parameter_shapes
(),
"x2"
));
}
struct
check_for_pass_op
{
bool
*
found
=
nullptr
;
...
...
test/ref_ops_test.cpp
View file @
9b3b10ed
...
...
@@ -3187,6 +3187,80 @@ TEST_CASE(nms_test)
EXPECT
(
migraphx
::
verify_range
(
result
,
gold
));
}
TEST_CASE
(
nms_transpose1_test
)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
boxes_s
{
migraphx
::
shape
::
float_type
,
{
1
,
4
,
6
}};
std
::
vector
<
float
>
boxes_vec
=
{
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.6
,
0.4
,
10.5
,
10.6
,
100.5
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
};
migraphx
::
shape
scores_s
{
migraphx
::
shape
::
float_type
,
{
1
,
1
,
6
}};
std
::
vector
<
float
>
scores_vec
=
{
0.9
,
0.75
,
0.6
,
0.95
,
0.5
,
0.3
};
auto
t_boxes_l
=
mm
->
add_literal
(
migraphx
::
literal
(
boxes_s
,
boxes_vec
));
auto
scores_l
=
mm
->
add_literal
(
migraphx
::
literal
(
scores_s
,
scores_vec
));
auto
max_out_l
=
mm
->
add_literal
(
int64_t
{
4
});
auto
iou_threshold
=
mm
->
add_literal
(
0.5
f
);
auto
score_threshold
=
mm
->
add_literal
(
0.0
f
);
auto
transpose_boxes
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
{{
"permutation"
,
{
0
,
2
,
1
}}}),
t_boxes_l
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"nonmaxsuppression"
,
{{
"center_point_box"
,
1
}}),
transpose_boxes
,
scores_l
,
max_out_l
,
iou_threshold
,
score_threshold
);
mm
->
add_return
({
r
});
p
.
compile
(
migraphx
::
ref
::
target
{});
auto
output
=
p
.
eval
({}).
back
();
std
::
vector
<
int64_t
>
result
;
output
.
visit
([
&
](
auto
out
)
{
result
.
assign
(
out
.
begin
(),
out
.
end
());
});
std
::
vector
<
int64_t
>
gold
=
{
0
,
0
,
3
,
0
,
0
,
0
,
0
,
0
,
5
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
EXPECT
(
migraphx
::
verify_range
(
result
,
gold
));
}
TEST_CASE
(
nms_transpose2_test
)
{
migraphx
::
program
p
;
auto
*
mm
=
p
.
get_main_module
();
migraphx
::
shape
boxes_s
{
migraphx
::
shape
::
float_type
,
{
4
,
1
,
6
}};
std
::
vector
<
float
>
boxes_vec
=
{
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.5
,
0.6
,
0.4
,
10.5
,
10.6
,
100.5
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
};
migraphx
::
shape
scores_s
{
migraphx
::
shape
::
float_type
,
{
1
,
1
,
6
}};
std
::
vector
<
float
>
scores_vec
=
{
0.9
,
0.75
,
0.6
,
0.95
,
0.5
,
0.3
};
auto
t_boxes_l
=
mm
->
add_literal
(
migraphx
::
literal
(
boxes_s
,
boxes_vec
));
auto
scores_l
=
mm
->
add_literal
(
migraphx
::
literal
(
scores_s
,
scores_vec
));
auto
max_out_l
=
mm
->
add_literal
(
int64_t
{
4
});
auto
iou_threshold
=
mm
->
add_literal
(
0.5
f
);
auto
score_threshold
=
mm
->
add_literal
(
0.0
f
);
auto
transpose_boxes
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"transpose"
,
{{
"permutation"
,
{
1
,
2
,
0
}}}),
t_boxes_l
);
auto
r
=
mm
->
add_instruction
(
migraphx
::
make_op
(
"nonmaxsuppression"
,
{{
"center_point_box"
,
1
}}),
transpose_boxes
,
scores_l
,
max_out_l
,
iou_threshold
,
score_threshold
);
mm
->
add_return
({
r
});
p
.
compile
(
migraphx
::
ref
::
target
{});
auto
output
=
p
.
eval
({}).
back
();
std
::
vector
<
int64_t
>
result
;
output
.
visit
([
&
](
auto
out
)
{
result
.
assign
(
out
.
begin
(),
out
.
end
());
});
std
::
vector
<
int64_t
>
gold
=
{
0
,
0
,
3
,
0
,
0
,
0
,
0
,
0
,
5
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
EXPECT
(
migraphx
::
verify_range
(
result
,
gold
));
}
TEST_CASE
(
nonzero_test
)
{
migraphx
::
program
p
;
...
...
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