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
421ecad6
Commit
421ecad6
authored
May 08, 2023
by
Alan Turner
Browse files
Merge remote-tracking branch 'origin/develop' into ck-gsg
parents
3d0426e9
7cf05301
Changes
84
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
10 deletions
+25
-10
test/verify/test_split_single_dyn_dim.cpp
test/verify/test_split_single_dyn_dim.cpp
+0
-7
tools/api.py
tools/api.py
+5
-2
tools/api/api.cpp
tools/api/api.cpp
+19
-0
tools/build_and_test_onnxrt.sh
tools/build_and_test_onnxrt.sh
+1
-1
No files found.
test/verify/test_split_single_dyn_dim.cpp
View file @
421ecad6
...
...
@@ -46,11 +46,4 @@ struct test_split_single_dyn_dim : verify_program<test_split_single_dyn_dim>
mm
->
add_return
({
add_ins
});
return
p
;
}
migraphx
::
compile_options
get_compile_options
()
const
{
migraphx
::
compile_options
co
;
co
.
split_single_dyn_dim
=
true
;
return
co
;
};
};
tools/api.py
View file @
421ecad6
...
...
@@ -764,10 +764,13 @@ const Target* object_cast(const U* x)
return reinterpret_cast<const Target*>(x);
}
template<class T, class... Ts, class Target
=
std::remove_pointer_t<T>>
template
<class T, class... Ts, class Target
=
std::remove_pointer_t<T>>
Target* allocate(Ts&&... xs)
{
return new Target(std::forward<Ts>(xs)...); // NOLINT
if constexpr(std::is_aggregate<Target>{})
return new Target{std::forward<Ts>(xs)...}; // NOLINT
else
return new Target(std::forward<Ts>(xs)...); // NOLINT
}
template<class T>
...
...
tools/api/api.cpp
View file @
421ecad6
...
...
@@ -24,6 +24,7 @@
#include <migraphx/execution_environment.hpp>
#include <migraphx/migraphx.h>
#include <migraphx/rank.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/shape.hpp>
#include <migraphx/program.hpp>
#include <migraphx/onnx.hpp>
...
...
@@ -145,6 +146,11 @@ void set_default_dim_value(onnx_options& options, size_t value)
options
.
default_dim_value
=
value
;
}
void
set_default_dyn_dim_value
(
onnx_options
&
options
,
const
shape
::
dynamic_dimension
&
dd
)
{
options
.
default_dyn_dim_value
=
dd
;
}
void
set_default_loop_iterations
(
onnx_options
&
options
,
int64_t
value
)
{
options
.
max_loop_iterations
=
value
;
...
...
@@ -161,6 +167,13 @@ void set_input_parameter_shape(onnx_options& options,
options
.
map_input_dims
[
std
::
string
(
name
)]
=
std
::
move
(
dims
);
}
void
set_dyn_input_parameter_shape
(
onnx_options
&
options
,
const
char
*
name
,
std
::
vector
<
shape
::
dynamic_dimension
>
dyn_dims
)
{
options
.
map_dyn_input_dims
[
std
::
string
(
name
)]
=
std
::
move
(
dyn_dims
);
}
void
set_input_parameter_shape
(
tf_options
&
options
,
const
char
*
name
,
std
::
vector
<
std
::
size_t
>
dims
)
{
options
.
map_input_dims
[
std
::
string
(
name
)]
=
std
::
move
(
dims
);
...
...
@@ -187,6 +200,12 @@ std::vector<const char*> get_names(const std::unordered_map<std::string, Value>&
return
result
;
}
template
<
class
T
>
std
::
set
<
T
>
make_set
(
const
T
*
x
,
std
::
size_t
n
)
{
return
{
x
,
x
+
n
};
}
void
quantize_fp16_with_op_names
(
program
&
prog
,
std
::
vector
<
std
::
string
>&
names
)
{
if
(
names
.
empty
())
...
...
tools/build_and_test_onnxrt.sh
View file @
421ecad6
...
...
@@ -26,7 +26,7 @@ pip3 install -r requirements-dev.txt
# Add newer cmake to the path
export
PATH
=
"/opt/cmake/bin:
$PATH
"
export
CXXFLAGS
=
"-D__HIP_PLATFORM_AMD__=1 -w"
./build.sh
--config
Release
--cmake_extra_defines
CMAKE_HIP_COMPILER
=
/opt/rocm/llvm/bin/clang++
--update
--build
--parallel
--cmake_extra_defines
ONNXRUNTIME_VERSION
=
$(
cat
./VERSION_NUMBER
)
--skip_tests
--rocm_home
/opt/rocm
--use_migraphx
--migraphx_home
/opt/rocm
--rocm_version
=
`
cat
/opt/rocm/.info/version-dev
`
./build.sh
--config
Release
--cmake_extra_defines
CMAKE_HIP_COMPILER
=
/opt/rocm/llvm/bin/clang++
--update
--build
--parallel
--cmake_extra_defines
ONNXRUNTIME_VERSION
=
$(
cat
./VERSION_NUMBER
)
--skip_tests
--rocm_home
/opt/rocm
--use_migraphx
--migraphx_home
/opt/rocm
--rocm_version
=
`
cat
/opt/rocm/.info/version-dev
`
--allow_running_as_root
cd
build/Linux/Release
#Add test launcher for onnxrt tests
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment