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
17589448
Commit
17589448
authored
Jun 19, 2023
by
Paul
Browse files
Run CK job on jenkins
parent
a0fa3742
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
Jenkinsfile
Jenkinsfile
+9
-1
src/targets/gpu/compile_ops.cpp
src/targets/gpu/compile_ops.cpp
+2
-4
src/targets/gpu/compiler.cpp
src/targets/gpu/compiler.cpp
+2
-2
src/targets/gpu/include/migraphx/gpu/compiler.hpp
src/targets/gpu/include/migraphx/gpu/compiler.hpp
+3
-3
src/targets/gpu/jit/ck_gemm.cpp
src/targets/gpu/jit/ck_gemm.cpp
+4
-1
No files found.
Jenkinsfile
View file @
17589448
...
@@ -89,6 +89,8 @@ def rocmnodename(name) {
...
@@ -89,6 +89,8 @@ def rocmnodename(name) {
node_name
=
"${rocmtest_name} && vega"
;
node_name
=
"${rocmtest_name} && vega"
;
}
else
if
(
name
==
"navi21"
)
{
}
else
if
(
name
==
"navi21"
)
{
node_name
=
"${rocmtest_name} && navi21"
;
node_name
=
"${rocmtest_name} && navi21"
;
}
else
if
(
name
==
"mi100+"
)
{
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a)"
;
}
else
if
(
name
==
"anygpu"
)
{
}
else
if
(
name
==
"anygpu"
)
{
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a || vega)"
;
node_name
=
"${rocmtest_name} && (gfx908 || gfx90a || vega)"
;
}
else
if
(
name
==
"nogpu"
)
{
}
else
if
(
name
==
"nogpu"
)
{
...
@@ -134,6 +136,12 @@ rocmtest clang_debug: rocmnode('vega') { cmake_build ->
...
@@ -134,6 +136,12 @@ rocmtest clang_debug: rocmnode('vega') { cmake_build ->
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DMIGRAPHX_ENABLE_MLIR=On -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}' -DCMAKE_C_FLAGS_DEBUG='${debug_flags}'"
)
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DMIGRAPHX_ENABLE_MLIR=On -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags}' -DCMAKE_C_FLAGS_DEBUG='${debug_flags}'"
)
}
}
}
}
},
ck_release:
rocmnode
(
'mi100+'
)
{
cmake_build
->
stage
(
'CK Release'
)
{
withEnv
([
'MIGRAPHX_ENABLE_CK=1'
,
'MIGRAPHX_TUNE_CK=1'
])
{
cmake_build
(
flags:
"-DCMAKE_BUILD_TYPE=release"
)
}
}
},
clang_asan:
rocmnode
(
'nogpu'
)
{
cmake_build
->
},
clang_asan:
rocmnode
(
'nogpu'
)
{
cmake_build
->
stage
(
'Clang ASAN'
)
{
stage
(
'Clang ASAN'
)
{
def
sanitizers
=
"undefined,address"
def
sanitizers
=
"undefined,address"
...
...
src/targets/gpu/compile_ops.cpp
View file @
17589448
...
@@ -113,7 +113,7 @@ struct compile_plan
...
@@ -113,7 +113,7 @@ struct compile_plan
instruction_ref
ins
;
instruction_ref
ins
;
optional
<
tuning_config
>
config
=
nullopt
;
optional
<
tuning_config
>
config
=
nullopt
;
std
::
vector
<
compiled_result
>
results
=
{};
std
::
vector
<
compiled_result
>
results
=
{};
void
update_config
()
{
config
=
get_tuning_config
(
*
ctx
,
ins
,
preop
);
}
void
update_config
(
bool
exhaustive
)
{
config
=
get_tuning_config
(
*
ctx
,
ins
,
preop
,
exhaustive
);
}
template
<
class
Vector
>
template
<
class
Vector
>
void
add_compiles
(
Vector
&
compiles
,
problem_cache
&
pc
)
void
add_compiles
(
Vector
&
compiles
,
problem_cache
&
pc
)
{
{
...
@@ -202,9 +202,7 @@ struct compile_manager
...
@@ -202,9 +202,7 @@ struct compile_manager
void
update_configs
()
void
update_configs
()
{
{
if
(
not
exhaustive
)
par_compile
(
cps
.
size
(),
[
&
](
auto
i
)
{
cps
[
i
].
update_config
(
exhaustive
);
});
return
;
par_compile
(
cps
.
size
(),
[
&
](
auto
i
)
{
cps
[
i
].
update_config
();
});
}
}
void
compile
(
module
&
m
)
void
compile
(
module
&
m
)
...
...
src/targets/gpu/compiler.cpp
View file @
17589448
...
@@ -63,9 +63,9 @@ compile_op(const std::string& name, context& ctx, const std::vector<shape>& inpu
...
@@ -63,9 +63,9 @@ compile_op(const std::string& name, context& ctx, const std::vector<shape>& inpu
return
compiler_map
().
at
(
name
).
compile_op
(
ctx
,
inputs
,
v
);
return
compiler_map
().
at
(
name
).
compile_op
(
ctx
,
inputs
,
v
);
}
}
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
)
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
bool
exhaustive
)
{
{
return
compiler_map
().
at
(
op
.
name
()).
get_tuning_config
(
ctx
,
ins
,
op
);
return
compiler_map
().
at
(
op
.
name
()).
get_tuning_config
(
ctx
,
ins
,
op
,
exhaustive
);
}
}
}
// namespace gpu
}
// namespace gpu
...
...
src/targets/gpu/include/migraphx/gpu/compiler.hpp
View file @
17589448
...
@@ -79,7 +79,7 @@ using compiler_compile =
...
@@ -79,7 +79,7 @@ using compiler_compile =
using
compiler_compile_op
=
using
compiler_compile_op
=
std
::
function
<
operation
(
context
&
,
const
std
::
vector
<
shape
>&
inputs
,
const
value
&
)
>
;
std
::
function
<
operation
(
context
&
,
const
std
::
vector
<
shape
>&
inputs
,
const
value
&
)
>
;
using
compiler_tuning_config
=
using
compiler_tuning_config
=
std
::
function
<
optional
<
tuning_config
>
(
context
&
,
instruction_ref
,
const
operation
&
)
>
;
std
::
function
<
optional
<
tuning_config
>
(
context
&
,
instruction_ref
,
const
operation
&
,
bool
)
>
;
void
register_compiler
(
const
std
::
string
&
name
,
void
register_compiler
(
const
std
::
string
&
name
,
compiler_compile
c
,
compiler_compile
c
,
...
@@ -91,7 +91,7 @@ compiler_replace
...
@@ -91,7 +91,7 @@ compiler_replace
compile
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
const
value
&
solution
);
compile
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
const
value
&
solution
);
operation
operation
compile_op
(
const
std
::
string
&
name
,
context
&
ctx
,
const
std
::
vector
<
shape
>&
inputs
,
const
value
&
v
);
compile_op
(
const
std
::
string
&
name
,
context
&
ctx
,
const
std
::
vector
<
shape
>&
inputs
,
const
value
&
v
);
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
);
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
bool
exhaustive
);
template
<
class
T
>
template
<
class
T
>
void
register_compiler
()
void
register_compiler
()
...
@@ -125,7 +125,7 @@ template <class Derived>
...
@@ -125,7 +125,7 @@ template <class Derived>
struct
compiler
:
auto_register_compiler
<
Derived
>
struct
compiler
:
auto_register_compiler
<
Derived
>
{
{
const
Derived
&
derived
()
const
{
return
static_cast
<
const
Derived
&>
(
*
this
);
}
const
Derived
&
derived
()
const
{
return
static_cast
<
const
Derived
&>
(
*
this
);
}
optional
<
tuning_config
>
get_tuning_config
(
context
&
,
instruction_ref
,
const
operation
&
)
const
optional
<
tuning_config
>
get_tuning_config
(
context
&
,
instruction_ref
,
const
operation
&
,
bool
)
const
{
{
return
nullopt
;
return
nullopt
;
}
}
...
...
src/targets/gpu/jit/ck_gemm.cpp
View file @
17589448
...
@@ -50,6 +50,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_LOG_CK_GEMM);
...
@@ -50,6 +50,7 @@ MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_LOG_CK_GEMM);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_TUNING
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_TUNING
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_TUNING_VALUE
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_TUNING_VALUE
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_DEBUG
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_CK_DEBUG
);
MIGRAPHX_DECLARE_ENV_VAR
(
MIGRAPHX_TUNE_CK
);
// NOLINTNEXTLINE
// NOLINTNEXTLINE
static
const
char
*
const
ck_gemm_kernel
=
R"__migraphx__(
static
const
char
*
const
ck_gemm_kernel
=
R"__migraphx__(
...
@@ -436,8 +437,10 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
...
@@ -436,8 +437,10 @@ struct ck_gemm_compiler : compiler<ck_gemm_compiler>
}
}
optional
<
tuning_config
>
optional
<
tuning_config
>
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
)
const
get_tuning_config
(
context
&
ctx
,
instruction_ref
ins
,
const
operation
&
op
,
bool
exhaustive
)
const
{
{
if
(
not
exhaustive
and
not
enabled
(
MIGRAPHX_TUNE_CK
{}))
return
nullopt
;
tuning_config
tc
;
tuning_config
tc
;
auto
shapes
=
to_shapes
(
ins
->
inputs
());
auto
shapes
=
to_shapes
(
ins
->
inputs
());
auto
problem
=
create_problem
(
shapes
,
create_settings
(
ins
,
op
));
auto
problem
=
create_problem
(
shapes
,
create_settings
(
ins
,
op
));
...
...
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