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
c425d1a7
Commit
c425d1a7
authored
Nov 12, 2018
by
Khalique
Browse files
Merge branch 'master' of
https://github.com/ROCmSoftwarePlatform/MIGraph
into lrn
parents
6177e85e
d9b08400
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
17 deletions
+20
-17
src/program.cpp
src/program.cpp
+5
-4
src/targets/cpu/CMakeLists.txt
src/targets/cpu/CMakeLists.txt
+6
-4
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+9
-9
No files found.
src/program.cpp
View file @
c425d1a7
...
...
@@ -366,7 +366,8 @@ argument program::eval(std::unordered_map<std::string, argument> params) const
auto
&
ctx
=
this
->
impl
->
ctx
;
return
generic_eval
(
*
this
,
this
->
impl
->
ctx
,
std
::
move
(
params
),
[
&
](
auto
&
ins
,
auto
f
)
{
ctx
.
finish
();
std
::
cout
<<
"Run instruction: "
<<
ins
->
name
()
<<
std
::
endl
;
std
::
cout
<<
"Run instruction: "
;
this
->
debug_print
(
ins
);
return
f
();
});
}
...
...
@@ -473,8 +474,8 @@ void program::perf_report(std::ostream& os, std::size_t n, parameter_map params)
<<
", "
<<
std
::
round
(
calculate_overhead_percent
)
<<
"%"
<<
std
::
endl
;
}
void
program
::
debug_print
()
{
std
::
cout
<<
*
this
<<
std
::
endl
;
}
void
program
::
debug_print
(
instruction_ref
ins
)
void
program
::
debug_print
()
const
{
std
::
cout
<<
*
this
<<
std
::
endl
;
}
void
program
::
debug_print
(
instruction_ref
ins
)
const
{
std
::
stringstream
ss
;
print_program
(
ss
,
*
this
,
[
&
](
auto
x
,
auto
&&
names
)
{
...
...
@@ -485,7 +486,7 @@ void program::debug_print(instruction_ref ins)
}
});
}
void
program
::
debug_print
(
const
std
::
vector
<
instruction_ref
>&
inss
)
void
program
::
debug_print
(
const
std
::
vector
<
instruction_ref
>&
inss
)
const
{
for
(
auto
ins
:
inss
)
debug_print
(
ins
);
...
...
src/targets/cpu/CMakeLists.txt
View file @
c425d1a7
...
...
@@ -4,17 +4,19 @@ add_library(migraph_cpu
lowering.cpp
gemm.cpp
)
set_target_properties
(
migraph_cpu PROPERTIES EXPORT_NAME cpu
)
find_path
(
BLAZE_INCLUDE blaze/Blaze.h
)
find_package
(
Threads
)
rocm_clang_tidy_check
(
migraph_cpu
)
target_link_libraries
(
migraph_cpu migraph Threads::Threads
)
target_include_directories
(
migraph_cpu PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
target_include_directories
(
migraph_cpu PRIVATE
${
BLAZE_INCLUDE
}
)
target_compile_definitions
(
migraph_cpu PRIVATE -DBLAZE_USE_CPP_THREADS
)
#install (TARGETS migraph_cpu
# LIBRARY DESTINATION /opt/rocm/lib)
#install (DIRECTORY include/migraph DESTINATION /opt/rocm/include)
rocm_install_targets
(
TARGETS migraph_cpu
INCLUDE
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
src/targets/gpu/CMakeLists.txt
View file @
c425d1a7
...
...
@@ -17,6 +17,7 @@ add_library(migraph_device
device/mul.cpp
device/concat.cpp
)
set_target_properties
(
migraph_device PROPERTIES EXPORT_NAME device
)
rocm_clang_tidy_check
(
migraph_device
)
target_link_libraries
(
migraph_device migraph hip::device
)
target_include_directories
(
migraph_device PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
...
...
@@ -42,15 +43,14 @@ add_library(migraph_gpu
write_literals.cpp
rocblas.cpp
)
set_target_properties
(
migraph_gpu PROPERTIES EXPORT_NAME gpu
)
rocm_clang_tidy_check
(
migraph_gpu
)
target_link_libraries
(
migraph_gpu migraph MIOpen
migraph_device
roc::rocblas
)
target_in
clude_directo
ries
(
migraph_gpu P
UBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
target_link_libraries
(
migraph_gpu
PUBLIC
migraph MIOpen roc::rocblas
)
target_
l
in
k_libra
ries
(
migraph_gpu P
RIVATE migraph_device
)
#install (TARGETS migraph_gpu
# LIBRARY DESTINATION /opt/rocm/lib)
#install (DIRECTORY include/migraph DESTINATION /opt/rocm/include)
#install (TARGETS migraph_device
# LIBRARY DESTINATION /opt/rocm/lib)
#install (DIRECTORY include/migraph DESTINATION /opt/rocm/include)
rocm_install_targets
(
TARGETS migraph_gpu migraph_device
INCLUDE
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
)
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment