Skip to content

Commit

Permalink
Merge pull request #1567 from bayedieng/close-ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarflakstad authored Jan 11, 2024
2 parents 402349d + 85e5680 commit c1876b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions candle-metal-kernels/src/cast.metal
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,13 @@ CAST(cast_i64_f32, cast_i64_f32_strided, int64_t, float)
#endif

#if defined(__HAVE_BFLOAT__)
#if __METAL_VERSION__ >= 310
CAST(cast_bf16_u32, cast_bf16_u32_strided, bfloat, uint32_t)
CAST(cast_bf16_f32, cast_bf16_f32_strided, bfloat, float)

CAST(cast_u8_bf16, cast_u8_bf16_strided, uint8_t, bfloat)
CAST(cast_u32_bf16, cast_u32_bf16_strided, uint32_t, bfloat)
CAST(cast_f32_bf16, cast_f32_bf16_strided, float, bfloat)

CAST_THROUGH(cast_bf16_u8, cast_bf16_u8_strided, bfloat, uint8_t, float)
CAST_THROUGH(cast_bf16_f16, cast_bf16_f16_strided, bfloat, half, float)
CAST_THROUGH(cast_f16_bf16, cast_f16_bf16_strided, half, bfloat, float)
#endif
#endif

0 comments on commit c1876b8

Please sign in to comment.