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
8aecc1dc
Unverified
Commit
8aecc1dc
authored
Apr 21, 2020
by
Yaxun (Sam) Liu
Committed by
GitHub
Apr 21, 2020
Browse files
Fix build failure for HIP-Clang (#509)
parent
394540b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
src/targets/gpu/CMakeLists.txt
src/targets/gpu/CMakeLists.txt
+1
-1
src/targets/gpu/device/include/migraphx/gpu/device/multi_index.hpp
...ts/gpu/device/include/migraphx/gpu/device/multi_index.hpp
+1
-1
src/targets/gpu/device/include/migraphx/gpu/device/reduce.hpp
...targets/gpu/device/include/migraphx/gpu/device/reduce.hpp
+2
-2
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
+3
-3
No files found.
src/targets/gpu/CMakeLists.txt
View file @
8aecc1dc
...
...
@@ -69,7 +69,7 @@ add_library(migraphx_device
set_target_properties
(
migraphx_device PROPERTIES EXPORT_NAME device
)
rocm_set_soversion
(
migraphx_device
${
MIGRAPHX_SO_VERSION
}
)
rocm_clang_tidy_check
(
migraphx_device
)
target_compile_options
(
migraphx_device PRIVATE -std=c++17
)
target_compile_options
(
migraphx_device PRIVATE -std=c++17
-Xclang -fallow-half-arguments-and-returns
)
target_link_libraries
(
migraphx_device migraphx hip::device -Wno-invalid-command-line-argument -amdgpu-target=gfx803 -amdgpu-target=gfx900 -amdgpu-target=gfx906
)
target_include_directories
(
migraphx_device PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/include>
)
target_include_directories
(
migraphx_device PRIVATE $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/device/include>
)
...
...
src/targets/gpu/device/include/migraphx/gpu/device/multi_index.hpp
View file @
8aecc1dc
...
...
@@ -31,7 +31,7 @@ struct multi_index
};
template
<
class
ForStride
>
auto
deduce_for_stride
(
ForStride
fs
)
->
decltype
(
fs
(
id
{}));
__device__
__host__
auto
deduce_for_stride
(
ForStride
fs
)
->
decltype
(
fs
(
id
{}));
MIGRAPHX_DEVICE_CONSTEXPR
multi_index
<
1
>
make_multi_index
(
index_int
i
,
index_int
n
)
{
...
...
src/targets/gpu/device/include/migraphx/gpu/device/reduce.hpp
View file @
8aecc1dc
...
...
@@ -69,7 +69,7 @@ struct min
struct
lowest
{
template
<
class
T
>
operator
T
()
const
__device__
__host__
operator
T
()
const
{
return
device_cast
(
std
::
numeric_limits
<
host_type
<
T
>>::
lowest
());
}
...
...
@@ -78,7 +78,7 @@ struct lowest
struct
highest
{
template
<
class
T
>
operator
T
()
const
__device__
__host__
operator
T
()
const
{
return
device_cast
(
std
::
numeric_limits
<
host_type
<
T
>>::
max
());
}
...
...
src/targets/gpu/device/include/migraphx/gpu/device/types.hpp
View file @
8aecc1dc
...
...
@@ -103,19 +103,19 @@ host_type<T>* host_cast(T* x)
}
template
<
class
T
>
device_type
<
T
>
device_cast
(
const
T
&
x
)
__device__
__host__
device_type
<
T
>
device_cast
(
const
T
&
x
)
{
return
reinterpret_cast
<
const
device_type
<
T
>&>
(
x
);
}
template
<
class
T
>
device_type
<
T
>*
device_cast
(
T
*
x
)
__device__
__host__
device_type
<
T
>*
device_cast
(
T
*
x
)
{
return
reinterpret_cast
<
device_type
<
T
>*>
(
x
);
}
template
<
class
T
>
tensor_view
<
device_type
<
T
>>
device_cast
(
tensor_view
<
T
>
x
)
__device__
__host__
tensor_view
<
device_type
<
T
>>
device_cast
(
tensor_view
<
T
>
x
)
{
return
{
x
.
get_shape
(),
reinterpret_cast
<
device_type
<
T
>*>
(
x
.
data
())};
}
...
...
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