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
96e062d1
Commit
96e062d1
authored
May 25, 2023
by
Paul
Browse files
Add additional src files
parent
36154263
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
src/targets/gpu/compile_hip_code_object.cpp
src/targets/gpu/compile_hip_code_object.cpp
+1
-1
src/targets/gpu/include/migraphx/gpu/compile_hip_code_object.hpp
...gets/gpu/include/migraphx/gpu/compile_hip_code_object.hpp
+4
-0
src/targets/gpu/jit/ck_gemm.cpp
src/targets/gpu/jit/ck_gemm.cpp
+3
-10
No files found.
src/targets/gpu/compile_hip_code_object.cpp
View file @
96e062d1
...
...
@@ -161,7 +161,7 @@ operation compile_hip_code_object(const std::string& content, hip_compile_option
assert
(
not
options
.
inputs
.
empty
());
assert
(
options
.
inputs
.
size
()
==
options
.
virtual_inputs
.
size
()
or
options
.
virtual_inputs
.
empty
());
std
::
vector
<
src_file
>
srcs
;
std
::
vector
<
src_file
>
srcs
=
options
.
additional_src_files
;
std
::
transform
(
migraphx_kernels
().
begin
(),
migraphx_kernels
().
end
(),
std
::
back_inserter
(
srcs
),
...
...
src/targets/gpu/include/migraphx/gpu/compile_hip_code_object.hpp
View file @
96e062d1
...
...
@@ -29,6 +29,9 @@
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
src_file
;
namespace
gpu
{
struct
context
;
...
...
@@ -42,6 +45,7 @@ struct hip_compile_options
std
::
string
kernel_name
=
"kernel"
;
std
::
string
params
=
""
;
std
::
vector
<
shape
>
virtual_inputs
=
{};
std
::
vector
<
src_file
>
additional_src_files
=
{};
/**
* @brief Set the launch parameters but allow v to override the values
...
...
src/targets/gpu/jit/ck_gemm.cpp
View file @
96e062d1
...
...
@@ -80,15 +80,6 @@ __global__ void ${kernel}(${params})
static
bool
transposed_matrix
(
const
shape
&
s
)
{
return
s
.
strides
().
back
()
!=
1
;
}
template
<
class
F
,
class
Action
>
auto
action_decorate
(
F
f
,
Action
action
)
{
return
[
=
](
auto
&&
...
xs
)
{
action
();
f
(
std
::
forward
<
decltype
(
xs
)
>
(
xs
)...);
};
}
using
tuning_entry
=
std
::
pair
<
std
::
vector
<
shape
>
,
size_t
>
;
static
std
::
vector
<
tuning_entry
>
read_tuning
(
const
std
::
string
&
s
)
{
...
...
@@ -300,7 +291,9 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
const
auto
block_size
=
solution
.
block_size
;
hip_compile_options
options
;
options
.
embedded_headers
=
ck_headers
;
std
::
transform
(
ck_headers
.
begin
(),
ck_headers
.
end
(),
std
::
back_inserter
(
options
.
additional_src_files
),
[
&
](
auto
&&
p
)
{
return
src_file
{
fs
::
path
{
p
.
first
},
p
.
second
};
});
auto
grid_size
=
can_fold_batch
?
blocks_per_batch
:
batch_count
*
blocks_per_batch
;
options
.
set_launch_params
(
v
,
grid_size
*
block_size
,
block_size
);
options
.
inputs
=
inputs
;
...
...
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