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
69bfcfb8
"src/vscode:/vscode.git/clone" did not exist on "44cc81156eaf7a9760a577b92878c71b0b5d5aa1"
Commit
69bfcfb8
authored
Aug 23, 2018
by
Paul
Browse files
Add header tests for cpu and gpu targets as well
parent
58681660
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
src/targets/gpu/include/migraph/gpu/kernels.hpp
src/targets/gpu/include/migraph/gpu/kernels.hpp
+4
-1
test/CMakeLists.txt
test/CMakeLists.txt
+26
-5
No files found.
src/targets/gpu/include/migraph/gpu/kernels.hpp
View file @
69bfcfb8
#ifndef MIGRAPH_GUARD_MIGRAPHLIB_KERNELS_HPP
#define MIGRAPH_GUARD_MIGRAPHLIB_KERNELS_HPP
#include <migraph/argument.hpp>
namespace
migraph
{
namespace
gpu
{
void
hip_contiguous
(
migraph
::
shape
output_shape
,
migraph
::
argument
arg
,
migraph
::
argument
result
);
void
hip_contiguous
(
shape
output_shape
,
argument
arg
,
argument
result
);
}
// namespace gpu
...
...
test/CMakeLists.txt
View file @
69bfcfb8
...
...
@@ -131,9 +131,30 @@ function(test_header NAME HEADER)
)
endfunction
()
file
(
GLOB HEADERS
${
CMAKE_SOURCE_DIR
}
/src/include/migraph/*.hpp
)
function
(
test_headers PREFIX
)
file
(
GLOB HEADERS
${
ARGN
}
)
foreach
(
HEADER
${
HEADERS
}
)
foreach
(
HEADER
${
HEADERS
}
)
file
(
RELATIVE_PATH HEADER_REL
${
CMAKE_SOURCE_DIR
}
${
HEADER
}
)
string
(
MAKE_C_IDENTIFIER
${
HEADER_REL
}
TEST_NAME
)
get_filename_component
(
BASE_NAME
${
HEADER
}
NAME_WE
)
test_header
(
header_
${
BASE_NAME
}
migraph/
${
BASE_NAME
}
.hpp
)
endforeach
()
test_header
(
header_
${
TEST_NAME
}
${
PREFIX
}
/
${
BASE_NAME
}
.hpp
)
if
(
MIGRAPH_ENABLE_GPU
)
target_link_libraries
(
header_
${
TEST_NAME
}
migraph_gpu
)
endif
()
endforeach
()
endfunction
()
test_headers
(
migraph
${
CMAKE_SOURCE_DIR
}
/src/include/migraph/*.hpp
)
test_headers
(
migraph/cpu
${
CMAKE_SOURCE_DIR
}
/src/targets/cpu/include/migraph/cpu/*.hpp
)
if
(
MIGRAPH_ENABLE_GPU
)
test_headers
(
migraph/gpu
${
CMAKE_SOURCE_DIR
}
/src/targets/gpu/include/migraph/gpu/*.hpp
)
endif
()
# file(GLOB HEADERS ${CMAKE_SOURCE_DIR}/src/include/migraph/*.hpp)
# file(GLOB HEADERS ${CMAKE_SOURCE_DIR}/src/targets/cpu/include/migraph/cpu/*.hpp)
# foreach(HEADER ${HEADERS})
# get_filename_component(BASE_NAME ${HEADER} NAME_WE)
# test_header(header_${BASE_NAME} migraph/${BASE_NAME}.hpp)
# endforeach()
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