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
994d24b6
Commit
994d24b6
authored
Dec 03, 2023
by
Umang Yadav
Browse files
use helper function to determine gfx940
parent
fe585d42
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
src/targets/gpu/device_name.cpp
src/targets/gpu/device_name.cpp
+6
-0
src/targets/gpu/include/migraphx/gpu/device_name.hpp
src/targets/gpu/include/migraphx/gpu/device_name.hpp
+2
-0
src/targets/gpu/rocblas.cpp
src/targets/gpu/rocblas.cpp
+1
-2
src/targets/gpu/target.cpp
src/targets/gpu/target.cpp
+3
-1
No files found.
src/targets/gpu/device_name.cpp
View file @
994d24b6
...
@@ -49,6 +49,12 @@ std::string get_device_name()
...
@@ -49,6 +49,12 @@ std::string get_device_name()
return
props
.
gcnArchName
;
return
props
.
gcnArchName
;
}
}
bool
gfx_has_fp8_intrinsics
()
{
const
auto
device_name
=
trim
(
split_string
(
get_device_name
(),
':'
).
front
());
return
(
starts_with
(
device_name
,
"gfx9"
)
and
device_name
>=
"gfx940"
);
}
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
src/targets/gpu/include/migraphx/gpu/device_name.hpp
View file @
994d24b6
...
@@ -37,6 +37,8 @@ MIGRAPHX_GPU_EXPORT std::string get_device_name();
...
@@ -37,6 +37,8 @@ MIGRAPHX_GPU_EXPORT std::string get_device_name();
MIGRAPHX_GPU_EXPORT
int
get_device_id
();
MIGRAPHX_GPU_EXPORT
int
get_device_id
();
MIGRAPHX_GPU_EXPORT
bool
gfx_has_fp8_intrinsics
();
}
// namespace gpu
}
// namespace gpu
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/targets/gpu/rocblas.cpp
View file @
994d24b6
...
@@ -58,8 +58,7 @@ bool rocblas_fp8_available()
...
@@ -58,8 +58,7 @@ bool rocblas_fp8_available()
#ifndef MIGRAPHX_USE_ROCBLAS_FP8_API
#ifndef MIGRAPHX_USE_ROCBLAS_FP8_API
return
false
;
return
false
;
#else
#else
const
auto
device_name
=
trim
(
split_string
(
get_device_name
(),
':'
).
front
());
return
gfx_has_fp8_intrinsics
();
return
(
starts_with
(
device_name
,
"gfx9"
)
and
device_name
>=
"gfx940"
);
#endif
#endif
}
}
...
...
src/targets/gpu/target.cpp
View file @
994d24b6
...
@@ -106,13 +106,15 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
...
@@ -106,13 +106,15 @@ std::vector<pass> target::get_passes(migraphx::context& gctx, const compile_opti
unsupported_types
.
erase
(
shape
::
type_t
::
uint8_type
);
unsupported_types
.
erase
(
shape
::
type_t
::
uint8_type
);
unsupported_types
.
erase
(
shape
::
type_t
::
int32_type
);
unsupported_types
.
erase
(
shape
::
type_t
::
int32_type
);
unsupported_types
.
erase
(
shape
::
type_t
::
tuple_type
);
unsupported_types
.
erase
(
shape
::
type_t
::
tuple_type
);
// whiltelist supported Ops for the FP8
std
::
set
<
std
::
string
>
unsupported_fp8_ops
=
{};
std
::
set
<
std
::
string
>
unsupported_fp8_ops
=
{};
if
(
not
gpu
::
rocblas_fp8_available
())
if
(
not
gpu
::
rocblas_fp8_available
())
{
{
unsupported_fp8_ops
.
insert
(
"dot"
);
unsupported_fp8_ops
.
insert
(
"dot"
);
}
}
// MIOpen doesn't have support for fp8 pooling yet.
unsupported_fp8_ops
.
insert
(
"pooling"
);
unsupported_fp8_ops
.
insert
(
"pooling"
);
if
(
not
starts_with
(
gpu
::
get_device_name
(),
"gfx94"
))
if
(
not
gpu
::
gfx_has_fp8_intrinsics
(
))
{
{
unsupported_fp8_ops
.
insert
(
"conv"
);
unsupported_fp8_ops
.
insert
(
"conv"
);
unsupported_fp8_ops
.
insert
(
"quant_conv"
);
unsupported_fp8_ops
.
insert
(
"quant_conv"
);
...
...
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