Skip to content

Commit e888298

Browse files
committed
Let's see if this does the trick
1 parent bedb592 commit e888298

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Common/ML/include/ML/3rdparty/GPUORTFloat16.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <cmath>
1010
#include <cstring>
1111
#include <limits>
12+
#include "GPUCommonDef.h"
1213

1314
namespace o2
1415
{
@@ -43,7 +44,7 @@ static_assert(
4344
/// Shared implementation between public and internal classes. CRTP pattern.
4445
/// </summary>
4546
template <class Derived>
46-
struct Float16Impl {
47+
GPUd() struct Float16Impl {
4748
protected:
4849
/// <summary>
4950
/// Converts from float to uint16_t float16 representation
@@ -267,7 +268,7 @@ union float32_bits {
267268
}; // namespace detail
268269

269270
template <class Derived>
270-
inline constexpr uint16_t Float16Impl<Derived>::ToUint16Impl(float v) noexcept
271+
GPUd() inline constexpr uint16_t Float16Impl<Derived>::ToUint16Impl(float v) noexcept
271272
{
272273
detail::float32_bits f{};
273274
f.f = v;
@@ -316,7 +317,7 @@ inline constexpr uint16_t Float16Impl<Derived>::ToUint16Impl(float v) noexcept
316317
}
317318

318319
template <class Derived>
319-
inline float Float16Impl<Derived>::ToFloatImpl() const noexcept
320+
GPUd() inline float Float16Impl<Derived>::ToFloatImpl() const noexcept
320321
{
321322
constexpr detail::float32_bits magic = {113 << 23};
322323
constexpr unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift
@@ -349,7 +350,7 @@ inline float Float16Impl<Derived>::ToFloatImpl() const noexcept
349350

350351
/// Shared implementation between public and internal classes. CRTP pattern.
351352
template <class Derived>
352-
struct BFloat16Impl {
353+
GPUd() struct BFloat16Impl {
353354
protected:
354355
/// <summary>
355356
/// Converts from float to uint16_t float16 representation
@@ -520,7 +521,7 @@ struct BFloat16Impl {
520521
};
521522

522523
template <class Derived>
523-
inline uint16_t BFloat16Impl<Derived>::ToUint16Impl(float v) noexcept
524+
GPUd() inline uint16_t BFloat16Impl<Derived>::ToUint16Impl(float v) noexcept
524525
{
525526
uint16_t result;
526527
if (std::isnan(v)) {
@@ -595,7 +596,7 @@ inline float BFloat16Impl<Derived>::ToFloatImpl() const noexcept
595596
*
596597
* \endcode
597598
*/
598-
struct Float16_t : OrtDataType::Float16Impl<Float16_t> {
599+
GPUd() struct Float16_t : OrtDataType::Float16Impl<Float16_t> {
599600
private:
600601
/// <summary>
601602
/// Constructor from a 16-bit representation of a float16 value
@@ -737,7 +738,7 @@ static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match");
737738
*
738739
* \endcode
739740
*/
740-
struct BFloat16_t : OrtDataType::BFloat16Impl<BFloat16_t> {
741+
GPUd() struct BFloat16_t : OrtDataType::BFloat16Impl<BFloat16_t> {
741742
private:
742743
/// <summary>
743744
/// Constructor from a uint16_t representation of bfloat16

GPU/GPUTracking/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ set(SRCS_NO_CINT ${SRCS_NO_CINT}
193193
Merger/GPUTPCGMO2Output.cxx)
194194

195195
if(NOT ALIGPU_BUILD_TYPE STREQUAL "Standalone")
196-
list(APPEND SRCS_NO_CINT TPCClusterFinder/GPUTPCNNClusterizer.cxx)
197-
list(APPEND SRCS_NO_CINT TPCClusterFinder/GPUTPCNNClusterizerInternals.cxx)
196+
list(APPEND SRCS_NO_CINT TPCClusterFinder/GPUTPCNNClusterizer.cxx TPCClusterFinder/GPUTPCNNClusterizerInternals.cxx)
198197
endif()
199198

200199
set(SRCS_DATATYPES

0 commit comments

Comments
 (0)