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
9d3fb0b5
Unverified
Commit
9d3fb0b5
authored
Aug 05, 2023
by
Ted Themistokleous
Committed by
GitHub
Aug 05, 2023
Browse files
Merge branch 'develop' into enable_navi_32_ci
parents
9c91c08d
aeb9f78c
Changes
278
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
137 additions
and
91 deletions
+137
-91
src/targets/gpu/include/migraphx/gpu/device/argmin.hpp
src/targets/gpu/include/migraphx/gpu/device/argmin.hpp
+5
-2
src/targets/gpu/include/migraphx/gpu/device/config.hpp
src/targets/gpu/include/migraphx/gpu/device/config.hpp
+30
-0
src/targets/gpu/include/migraphx/gpu/device/contiguous.hpp
src/targets/gpu/include/migraphx/gpu/device/contiguous.hpp
+4
-2
src/targets/gpu/include/migraphx/gpu/device/fill.hpp
src/targets/gpu/include/migraphx/gpu/device/fill.hpp
+2
-2
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
+3
-2
src/targets/gpu/include/migraphx/gpu/device/int8_gemm_pack.hpp
...argets/gpu/include/migraphx/gpu/device/int8_gemm_pack.hpp
+7
-3
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
+5
-2
src/targets/gpu/include/migraphx/gpu/device/multinomial.hpp
src/targets/gpu/include/migraphx/gpu/device/multinomial.hpp
+5
-5
src/targets/gpu/include/migraphx/gpu/device/nonzero.hpp
src/targets/gpu/include/migraphx/gpu/device/nonzero.hpp
+4
-2
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
+6
-6
src/targets/gpu/include/migraphx/gpu/device/prefix_scan_sum.hpp
...rgets/gpu/include/migraphx/gpu/device/prefix_scan_sum.hpp
+7
-7
src/targets/gpu/include/migraphx/gpu/device/reverse.hpp
src/targets/gpu/include/migraphx/gpu/device/reverse.hpp
+5
-3
src/targets/gpu/include/migraphx/gpu/device/rnn_variable_seq_lens.hpp
...gpu/include/migraphx/gpu/device/rnn_variable_seq_lens.hpp
+15
-15
src/targets/gpu/include/migraphx/gpu/device/scatter.hpp
src/targets/gpu/include/migraphx/gpu/device/scatter.hpp
+2
-2
src/targets/gpu/include/migraphx/gpu/device/topk.hpp
src/targets/gpu/include/migraphx/gpu/device/topk.hpp
+13
-13
src/targets/gpu/include/migraphx/gpu/device_name.hpp
src/targets/gpu/include/migraphx/gpu/device_name.hpp
+4
-4
src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp
src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp
+2
-3
src/targets/gpu/include/migraphx/gpu/hip.hpp
src/targets/gpu/include/migraphx/gpu/hip.hpp
+15
-14
src/targets/gpu/include/migraphx/gpu/kernel.hpp
src/targets/gpu/include/migraphx/gpu/kernel.hpp
+2
-2
src/targets/gpu/include/migraphx/gpu/lowering.hpp
src/targets/gpu/include/migraphx/gpu/lowering.hpp
+1
-2
No files found.
src/targets/gpu/include/migraphx/gpu/device/argmin.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_ARGMIN_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_ARGMIN_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
argmin
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
,
int64_t
axis
);
void
MIGRAPHX_DEVICE_EXPORT
argmin
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
,
int64_t
axis
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/config.hpp
0 → 100644
View file @
9d3fb0b5
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_RTGLIB_DEVICE_CONFIG_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_CONFIG_HPP
#include <migraphx/config.hpp>
#include <migraphx/gpu/device/export.h>
#endif
src/targets/gpu/include/migraphx/gpu/device/contiguous.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_MIGRAPHLIB_KERNELS_HPP
#define MIGRAPHX_GUARD_MIGRAPHLIB_KERNELS_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,9 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,9 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
contiguous
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
void
MIGRAPHX_DEVICE_EXPORT
contiguous
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/fill.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_FILL_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_FILL_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
fill
(
hipStream_t
stream
,
const
argument
&
result
,
unsigned
long
val
);
void
MIGRAPHX_DEVICE_EXPORT
fill
(
hipStream_t
stream
,
const
argument
&
result
,
unsigned
long
val
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/gather.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_GATHER_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_GATHER_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,8 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,8 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
gather
(
hipStream_t
stream
,
argument
result
,
argument
arg1
,
argument
arg2
,
int64_t
axis
);
argument
MIGRAPHX_DEVICE_EXPORT
gather
(
hipStream_t
stream
,
argument
result
,
argument
arg1
,
argument
arg2
,
int64_t
axis
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/int8_gemm_pack.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_INT8_GEMM_PACK_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_INT8_GEMM_PACK_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,9 +33,13 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,9 +33,13 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
int8_gemm_pack_a
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
void
MIGRAPHX_DEVICE_EXPORT
int8_gemm_pack_a
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
void
int8_gemm_pack_b
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
void
MIGRAPHX_DEVICE_EXPORT
int8_gemm_pack_b
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/logsoftmax.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_LOGSOFTMAX_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_LOGSOFTMAX_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
logsoftmax
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
,
int64_t
axis
);
void
MIGRAPHX_DEVICE_EXPORT
logsoftmax
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg
,
int64_t
axis
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/multinomial.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_MULTINOMIAL_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_MULTINOMIAL_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,10 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,10 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
multinomial
(
hipStream_t
stream
,
void
MIGRAPHX_DEVICE_EXPORT
multinomial
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
result
,
const
argument
&
arg0
,
const
argument
&
arg0
,
const
argument
&
arg1
);
const
argument
&
arg1
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/nonzero.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_NONZERO_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_NONZERO_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,9 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,9 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
nonzero
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg_data
);
argument
MIGRAPHX_DEVICE_EXPORT
nonzero
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
arg_data
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/pad.hpp
View file @
9d3fb0b5
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_PAD_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_PAD_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -34,11 +34,11 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -34,11 +34,11 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
pad
(
hipStream_t
stream
,
argument
MIGRAPHX_DEVICE_EXPORT
pad
(
hipStream_t
stream
,
argument
result
,
argument
result
,
argument
arg1
,
argument
arg1
,
float
value
,
float
value
,
std
::
vector
<
std
::
int64_t
>
pads
);
std
::
vector
<
std
::
int64_t
>
pads
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/prefix_scan_sum.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_DEVICE_PREFIX_SCAN_SUM_HPP
#define MIGRAPHX_GUARD_DEVICE_PREFIX_SCAN_SUM_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,12 +33,12 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,12 +33,12 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
prefix_scan_sum
(
hipStream_t
stream
,
void
MIGRAPHX_DEVICE_EXPORT
prefix_scan_sum
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
result
,
const
argument
&
arg
,
const
argument
&
arg
,
int32_t
axis
,
int32_t
axis
,
bool
exclusive
,
bool
exclusive
,
bool
reverse
);
bool
reverse
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/reverse.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_REVERSE_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_REVERSE_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,8 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,8 +33,10 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
argument
MIGRAPHX_DEVICE_EXPORT
reverse
(
hipStream_t
stream
,
reverse
(
hipStream_t
stream
,
argument
result
,
argument
arg1
,
const
std
::
vector
<
int64_t
>&
axes
);
argument
result
,
argument
arg1
,
const
std
::
vector
<
int64_t
>&
axes
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/rnn_variable_seq_lens.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_RNN_VARIABLE_SEQ_LENS_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_RNN_VARIABLE_SEQ_LENS_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,22 +33,22 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,22 +33,22 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
void
rnn_var_sl_shift_sequence
(
hipStream_t
stream
,
void
MIGRAPHX_DEVICE_EXPORT
rnn_var_sl_shift_sequence
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
result
,
const
argument
&
arg_hs
,
const
argument
&
arg_hs
,
const
argument
&
arg_sl
);
const
argument
&
arg_sl
);
void
rnn_var_sl_shift_output
(
hipStream_t
stream
,
void
MIGRAPHX_DEVICE_EXPORT
rnn_var_sl_shift_output
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
result
,
const
argument
&
arg_hs
,
const
argument
&
arg_hs
,
const
argument
&
arg_sl
,
const
argument
&
arg_sl
,
bool
is_reverse
);
bool
is_reverse
);
void
rnn_var_sl_last_output
(
hipStream_t
stream
,
void
MIGRAPHX_DEVICE_EXPORT
rnn_var_sl_last_output
(
hipStream_t
stream
,
const
argument
&
result
,
const
argument
&
result
,
const
argument
&
arg_hs
,
const
argument
&
arg_hs
,
const
argument
&
arg_sl
,
const
argument
&
arg_sl
,
bool
is_reverse
);
bool
is_reverse
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device/scatter.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_SCATTER_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_SCATTER_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,7 +33,7 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
scatter
(
argument
MIGRAPHX_DEVICE_EXPORT
scatter
(
hipStream_t
stream
,
argument
result
,
argument
arg0
,
argument
arg1
,
argument
arg2
,
int64_t
axis
);
hipStream_t
stream
,
argument
result
,
argument
arg0
,
argument
arg1
,
argument
arg2
,
int64_t
axis
);
}
// namespace device
}
// namespace device
...
...
src/targets/gpu/include/migraphx/gpu/device/topk.hpp
View file @
9d3fb0b5
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_TOPK_HPP
#define MIGRAPHX_GUARD_RTGLIB_DEVICE_TOPK_HPP
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/config.hpp>
#include <migraphx/
gpu/device/
config.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -33,19 +33,19 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -33,19 +33,19 @@ inline namespace MIGRAPHX_INLINE_NS {
namespace
gpu
{
namespace
gpu
{
namespace
device
{
namespace
device
{
argument
topk_smallest
(
hipStream_t
stream
,
argument
MIGRAPHX_DEVICE_EXPORT
topk_smallest
(
hipStream_t
stream
,
const
argument
&
val_res
,
const
argument
&
val_res
,
const
argument
&
ind_res
,
const
argument
&
ind_res
,
const
argument
&
arg
,
const
argument
&
arg
,
int64_t
k
,
int64_t
k
,
int64_t
axis
);
int64_t
axis
);
argument
topk_largest
(
hipStream_t
stream
,
argument
MIGRAPHX_DEVICE_EXPORT
topk_largest
(
hipStream_t
stream
,
const
argument
&
val_res
,
const
argument
&
val_res
,
const
argument
&
ind_res
,
const
argument
&
ind_res
,
const
argument
&
arg
,
const
argument
&
arg
,
int64_t
k
,
int64_t
k
,
int64_t
axis
);
int64_t
axis
);
}
// namespace device
}
// namespace device
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/device_name.hpp
View file @
9d3fb0b5
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#ifndef MIGRAPHX_GUARD_GPU_DEVICE_NAME_HPP
#ifndef MIGRAPHX_GUARD_GPU_DEVICE_NAME_HPP
#define MIGRAPHX_GUARD_GPU_DEVICE_NAME_HPP
#define MIGRAPHX_GUARD_GPU_DEVICE_NAME_HPP
#include <migraphx/config.hpp>
#include <migraphx/
gpu/
config.hpp>
#include <string>
#include <string>
struct
hipDeviceProp_t
;
struct
hipDeviceProp_t
;
...
@@ -33,11 +33,11 @@ namespace migraphx {
...
@@ -33,11 +33,11 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
namespace
gpu
{
namespace
gpu
{
std
::
string
get_arch_name
(
const
hipDeviceProp_t
&
props
);
MIGRAPHX_GPU_EXPORT
std
::
string
get_arch_name
(
const
hipDeviceProp_t
&
props
);
std
::
string
get_device_name
();
MIGRAPHX_GPU_EXPORT
std
::
string
get_device_name
();
int
get_device_id
();
MIGRAPHX_GPU_EXPORT
int
get_device_id
();
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/targets/gpu/include/migraphx/gpu/fuse_mlir.hpp
View file @
9d3fb0b5
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#ifndef MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP
#ifndef MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP
#define MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP
#define MIGRAPHX_GUARD_GPU_FUSE_MLIR_HPP
#include <migraphx/config.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/context.hpp>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -34,9 +33,9 @@ struct module_pass_manager;
...
@@ -34,9 +33,9 @@ struct module_pass_manager;
namespace
gpu
{
namespace
gpu
{
bool
mlir_enabled
();
MIGRAPHX_GPU_EXPORT
bool
mlir_enabled
();
struct
fuse_mlir
struct
MIGRAPHX_GPU_EXPORT
fuse_mlir
{
{
context
*
ctx
=
nullptr
;
context
*
ctx
=
nullptr
;
std
::
string
name
()
const
{
return
"gpu::fuse_mlir"
;
}
std
::
string
name
()
const
{
return
"gpu::fuse_mlir"
;
}
...
...
src/targets/gpu/include/migraphx/gpu/hip.hpp
View file @
9d3fb0b5
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#ifndef MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#ifndef MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#define MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#define MIGRAPHX_GUARD_MIGRAPHLIB_HIP_HPP
#include <migraphx/config.hpp>
#include <migraphx/
gpu/
config.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/argument.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/literal.hpp>
#include <migraphx/check_shapes.hpp>
#include <migraphx/check_shapes.hpp>
...
@@ -38,26 +38,26 @@ namespace gpu {
...
@@ -38,26 +38,26 @@ namespace gpu {
struct
context
;
struct
context
;
std
::
string
hip_error
(
int
error
);
MIGRAPHX_GPU_EXPORT
std
::
string
hip_error
(
int
error
);
argument
allocate_gpu
(
const
shape
&
s
,
bool
host
=
false
);
MIGRAPHX_GPU_EXPORT
argument
allocate_gpu
(
const
shape
&
s
,
bool
host
=
false
);
argument
register_on_gpu
(
const
argument
&
arg
);
MIGRAPHX_GPU_EXPORT
argument
register_on_gpu
(
const
argument
&
arg
);
argument
to_gpu
(
const
argument
&
arg
,
bool
host
=
false
);
MIGRAPHX_GPU_EXPORT
argument
to_gpu
(
const
argument
&
arg
,
bool
host
=
false
);
argument
from_gpu
(
const
argument
&
arg
);
MIGRAPHX_GPU_EXPORT
argument
from_gpu
(
const
argument
&
arg
);
void
set_device
(
std
::
size_t
id
);
MIGRAPHX_GPU_EXPORT
void
set_device
(
std
::
size_t
id
);
void
gpu_sync
();
MIGRAPHX_GPU_EXPORT
void
gpu_sync
();
void
gpu_sync
(
const
context
&
ctx
);
MIGRAPHX_GPU_EXPORT
void
gpu_sync
(
const
context
&
ctx
);
void
gpu_copy
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
MIGRAPHX_GPU_EXPORT
void
gpu_copy
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
void
copy_to_gpu
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
MIGRAPHX_GPU_EXPORT
void
copy_to_gpu
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
void
copy_from_gpu
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
MIGRAPHX_GPU_EXPORT
void
copy_from_gpu
(
context
&
ctx
,
const
argument
&
src
,
const
argument
&
dst
);
argument
get_preallocation
(
context
&
ctx
,
const
std
::
string
&
id
);
MIGRAPHX_GPU_EXPORT
argument
get_preallocation
(
context
&
ctx
,
const
std
::
string
&
id
);
struct
hip_allocate
struct
hip_allocate
{
{
...
@@ -187,7 +187,8 @@ struct hip_copy
...
@@ -187,7 +187,8 @@ struct hip_copy
std
::
ptrdiff_t
output_alias
(
const
std
::
vector
<
shape
>&
)
const
{
return
1
;
}
std
::
ptrdiff_t
output_alias
(
const
std
::
vector
<
shape
>&
)
const
{
return
1
;
}
};
};
void
store_preallocated_param
(
context
&
ctx
,
const
std
::
string
&
id
,
const
argument
&
a
);
MIGRAPHX_GPU_EXPORT
void
store_preallocated_param
(
context
&
ctx
,
const
std
::
string
&
id
,
const
argument
&
a
);
struct
hip_allocate_memory
struct
hip_allocate_memory
{
{
...
...
src/targets/gpu/include/migraphx/gpu/kernel.hpp
View file @
9d3fb0b5
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#ifndef MIGRAPHX_GUARD_RTGLIB_KERNEL_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_KERNEL_HPP
#define MIGRAPHX_GUARD_RTGLIB_KERNEL_HPP
#define MIGRAPHX_GUARD_RTGLIB_KERNEL_HPP
#include <migraphx/config.hpp>
#include <migraphx/
gpu/
config.hpp>
#include <migraphx/gpu/pack_args.hpp>
#include <migraphx/gpu/pack_args.hpp>
#include <hip/hip_runtime_api.h>
#include <hip/hip_runtime_api.h>
#include <memory>
#include <memory>
...
@@ -37,7 +37,7 @@ namespace gpu {
...
@@ -37,7 +37,7 @@ namespace gpu {
struct
kernel_impl
;
struct
kernel_impl
;
struct
kernel
struct
MIGRAPHX_GPU_EXPORT
kernel
{
{
kernel
()
=
default
;
kernel
()
=
default
;
kernel
(
const
char
*
image
,
const
std
::
string
&
name
);
kernel
(
const
char
*
image
,
const
std
::
string
&
name
);
...
...
src/targets/gpu/include/migraphx/gpu/lowering.hpp
View file @
9d3fb0b5
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
#ifndef MIGRAPHX_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#ifndef MIGRAPHX_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#define MIGRAPHX_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#define MIGRAPHX_GUARD_RTGLIB_MIOPEN_LOWERING_HPP
#include <migraphx/config.hpp>
#include <migraphx/gpu/context.hpp>
#include <migraphx/gpu/context.hpp>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -40,7 +39,7 @@ namespace gpu {
...
@@ -40,7 +39,7 @@ namespace gpu {
* * Maps instructions to their GPU-specific counterparts.
* * Maps instructions to their GPU-specific counterparts.
* * Inserts `allocate` instructions before GPU operators.
* * Inserts `allocate` instructions before GPU operators.
*/
*/
struct
lowering
struct
MIGRAPHX_GPU_EXPORT
lowering
{
{
context
*
ctx
;
context
*
ctx
;
bool
offload_copy
;
bool
offload_copy
;
...
...
Prev
1
…
5
6
7
8
9
10
11
12
13
14
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