Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
rust: [stable]
rust: [stable, "1.70"]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand Down
45 changes: 35 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "float8"
version = "0.4.0"
rust-version = "1.70"
edition = "2021"
description = "8-bit floating point types for Rust"
homepage = "https://github.com/EricLBuehler/float8"
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ enum SaturationType {

// https://gitlab.com/nvidia/headers/cuda-individual/cudart/-/blob/main/cuda_fp8.hpp?ref_type=heads#L97
const fn convert_to_fp8(x: f64, saturate: SaturationType, fp8_interpretation: Kind) -> u8 {
let xbits: u64 = x.to_bits();
// TODO: use x.to_bits() with MSRV 1.83
#[allow(unknown_lints, unnecessary_transmutes)]
let xbits: u64 = unsafe { std::mem::transmute::<f64, u64>(x) };

let (
fp8_maxnorm,
Expand Down
Loading