Max Podkorytov
e469fee046
poc convert fnuz fp8 to non-native dtype similar to ocp ( #2871 )
2025-09-18 22:51:01 -07:00
Illia Silin
d2eab23958
Split up data_type header. ( #1996 )
...
* split fp64 vector data type
* add missing header
* move e8m0 structs
* split off numeric_utils header
* fix typo
* split off numeric limits header
* update data_type header
* fix clang format
* split off vector type header
* fix clang format
* fix typo for binary_inf
2025-03-24 15:08:54 -07:00
Juan Manuel Martinez Caamaño
901e5f1540
Remove reinterpret_cast uses that result in undefined behaviour. ( #1445 )
...
* Remove reinterpret_cast uses that result in undefined behaviour. Use a bitcast instead.
See https://en.cppreference.com/w/cpp/language/reinterpret_cast#Type_accessibility
Closes #1439
* fix clang format
---------
Co-authored-by: illsilin <Illia.Silin@amd.com >
2024-08-07 11:49:02 -07:00
Juan Manuel Martinez Caamaño
fd9ef4e678
Add missing constexpr to if conditions ( #1444 )
2024-08-06 11:40:34 -07:00
Rostyslav Geyyer
1fd27d520f
Fix bf8 conversion issues ( #1003 )
...
* Fix the conversion
* Add bf8 functionality
* Enable example on MI200 as well
2023-10-20 08:00:45 -05:00
zjing14
bf435140dc
Clean DTYPES conditions in CMake ( #974 )
...
* Add a condition to build fp8 instances
* simplified buffer_load/store
* add bfp8/fp8
* fixed
* remove all f8/bf8 condition include folder
* fixed cmake conditions
* fixed DTYPES=fp16/bfp16
* fix
* fixed buffer_load
* fixed buffer_store
* fix
* clean example cmake files
* fixed ci
* fixed cit
---------
Co-authored-by: Rostyslav Geyyer <rosty.geyyer@amd.com >
Co-authored-by: Jing Zhang <jizha@amd.com >
2023-10-18 11:14:14 -05:00
Rostyslav Geyyer
f17af2e9ed
Add native conversions fp8<->fp32 ( #908 )
...
* Add native conversions
* Add bf8 conversions
2023-09-17 20:56:27 -05:00
Rostyslav Geyyer
62d4af7449
Refactor f8_t, add bf8_t ( #792 )
...
* Refactor f8_t to add bf8_t
* Add check_err impl for f8_t
* Update fp8 test
* Format
* Revert the fix
* Update vector_type implementation
* Add bf8 test
* Add bf8, use BitInt types
* Add bf8 conversion methods
* Update type_convert for fp8/bf8
* Add check_err fp8/bf8 support
* Add subnorm fp8 tests
* Add subnorm bf8 tests
* Fix conversion
* Add bf8 cmake bindings
* Add macros to enable build with disabled fp8/bf8
* Remove is_native method
* Update flag combination for mixed precision instances
* Add more flag checks
* Add another flag to a client example
* Add type traits, decouple f8/bf8 casting
* Clean up
* Decouple fp8 and bf8 flags
* Remove more redundant flags
* Remove leftover comments
2023-09-12 17:04:27 -05:00
Rostyslav Geyyer
f0c620c42e
FP8 enablement - add a pseudorandom number generator, add conversion methods ( #708 )
...
* Add basic fp8 definitions and prn-generator
* Format
* Add fp8<->fp32 type_convert
* Format
* Split type_convert and cast_to/from_f8
* Format
* Minor fix
* Minor fix
* Move fp8 utils to a separate header
* Add elementwise ops
* Add fp8_convert_sr
* Format
* Add element op
* Eliminate magic numbers
* Split f8_convert_sr in host and device
* Format
* Add some constexpr
* Add a datatype test
* Format
* Another format
* Add fp8<->fp16 tests
* Update type_converts
* Format
* Add fp16 casting functions
* Format
* Use seed as a runtime arg
* Use element location for PRNG
* Format
* Add fp8<->fp16 to PassThrough element op
* Clean up
* Merge host and device implementations
* Add comments on rounding modes
* Remove leftover code
* Put type_converts into a separate header
* Put random number gen to a separate header
* Rearrange f8_utils' namespaces
* Refactor type_convert.hpp
* Move f8_t definition
2023-06-19 11:20:35 -05:00