lufloat
Fastest FP16 Math and AI Library for AMD APUs
⚠️ WORK IN PROGRESS ALPHA
Note: Tested with AI Max+ 395 on Fedora.
| Operation | Size | Data Read | Data Write | Time | Bandwidth | Utilitzation |
|---|---|---|---|---|---|---|
negative_mask |
2^34 |
32GiB | 32GiB | 288ms | 238.6GB/s | 93.2% |
negative_mask_inplace |
2^35 |
64GiB | 64GiB | 576ms | 238.6GB/s | 93.2% |
positive_mask |
2^34 |
32GiB | 32GiB | 288ms | 238.6GB/s | 93.2% |
positive_mask_inplace |
2^35 |
64GiB | 64GiB | 576ms | 238.6GB/s | 93.2% |
Usage
use ;
let arena = new;
let mut buffer = new;
let input_data = buffer.slice_mut;
input_data = 0b1_01111_0000000000; // -1.0
input_data = 0b0_00000_0000000000; // 0.0
input_data = 0b0_01111_0000000000; // 1.0
buffer.positive_mask_inplace;
let output_data = buffer.slice;
println!; // 0.0, 1.0, 1.0
Requirements
- AMD RDNA 3 APU
- Linux
- ROCm/HIP
hipcc - binutils
ar
License
lufloat Copyright (C) 2026 Thopuri Omkar Eeswar
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/