|
16 | 16 |
|
17 | 17 | //================================================================================
|
18 | 18 | // this file has been auto-generated, do not modify its contents!
|
19 |
| -// date: 2024-11-26 14:20:49.081641 |
20 |
| -// git hash: 76c695a4cc5b13b3d5841ac5085574a5b47a299c |
| 19 | +// date: 2024-12-02 10:59:19.296684 |
| 20 | +// git hash: a2b08a56e31d1c9a6302c8a49c740cf56fcc1607 |
21 | 21 | //================================================================================
|
22 | 22 |
|
23 | 23 | #ifndef KERNEL_FLOAT_MACROS_H
|
@@ -4535,7 +4535,9 @@ namespace kernel_float {
|
4535 | 4535 | namespace approx {
|
4536 | 4536 |
|
4537 | 4537 | static_assert(sizeof(unsigned int) * 8 == 32, "invalid size of unsigned int");
|
| 4538 | +static_assert(sizeof(unsigned short) * 8 == 16, "invalid size of unsigned short"); |
4538 | 4539 | using uint32_t = unsigned int;
|
| 4540 | +using uint16_t = unsigned short; |
4539 | 4541 |
|
4540 | 4542 | template<typename T, typename U>
|
4541 | 4543 | KERNEL_FLOAT_DEVICE T transmute(const U& input) {
|
@@ -4878,12 +4880,12 @@ KERNEL_FLOAT_DEVICE bfloat16x2_t exp(bfloat16x2_t arg) {
|
4878 | 4880 | static constexpr float OFFSET = 382.4958400542335;
|
4879 | 4881 | static constexpr float MINIMUM = 382;
|
4880 | 4882 |
|
4881 |
| - float a = fmaxf(fmaf(bfloat162float(arg.x), SCALE, OFFSET), MINIMUM); |
4882 |
| - float b = fmaxf(fmaf(bfloat162float(arg.y), SCALE, OFFSET), MINIMUM); |
| 4883 | + float a = fmaxf(fmaf(__bfloat162float(arg.x), SCALE, OFFSET), MINIMUM); |
| 4884 | + float b = fmaxf(fmaf(__bfloat162float(arg.y), SCALE, OFFSET), MINIMUM); |
4883 | 4885 |
|
4884 | 4886 | return {
|
4885 |
| - transmute<__bfloat16>(uint16_t(transmute<uint32_t>(a))), |
4886 |
| - transmute<__bfloat16>(uint16_t(transmute<uint32_t>(b)))}; |
| 4887 | + transmute<bfloat16_t>(uint16_t(transmute<uint32_t>(a))), |
| 4888 | + transmute<bfloat16_t>(uint16_t(transmute<uint32_t>(b)))}; |
4887 | 4889 | }
|
4888 | 4890 | #endif
|
4889 | 4891 | } // namespace approx
|
|
0 commit comments