Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct USE_HIP_FP8_DEF define condition #1455

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tensilelite/Tensile/Source/hip_f8_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
#ifndef _HIP_FLOAT8_IMPL_H_
#define _HIP_FLOAT8_IMPL_H_

#include <hip/hip_fp8.h>
#include <hip/hip_version.h>

#if HIP_VERSION_MAJOR > 6
#define USE_HIP_FP8_DEF 1
#elif HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR > 3
#define USE_HIP_FP8_DEF 1
#elif HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR == 3 && HIP_VERSION_PATCH > 42130
#define USE_HIP_FP8_DEF 1
#endif

namespace tensile_hip_f8_impl
{
__host__ inline int clz(uint32_t x)
Expand Down
10 changes: 7 additions & 3 deletions tensilelite/Tensile/Source/lib/include/Tensile/hip_f8_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@
#ifndef _HIP_FLOAT8_IMPL_H_
#define _HIP_FLOAT8_IMPL_H_

#include <hip/hip_fp8.h>
#include <hip/hip_version.h>
#if HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR > 2 \
&& HIP_VERSION_PATCH > 42130 //tmp before gfx94 use hip f8 header

#if HIP_VERSION_MAJOR > 6
#define USE_HIP_FP8_DEF 1
#elif HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR > 3
#define USE_HIP_FP8_DEF 1
#elif HIP_VERSION_MAJOR == 6 && HIP_VERSION_MINOR == 3 && HIP_VERSION_PATCH > 42130
#define USE_HIP_FP8_DEF 1
#endif
#include <hip/hip_fp8.h>

namespace tensile_hip_f8_impl
{
Expand Down