Beware of fast-math
date: 2023-10-25 · Tags: #til, #system-programming, #clangfast-math is a set of compiler flags that enables a series of optimizations for floating-point arithmetic.
-ffast-math
(and included by-Ofast
) in GCC and Clang-fp-model=fast
(the default) in ICC/fp:fast
in MSVC--math-mode=fast
command line option or@fastmath
macro in Julia.
But please notice that fast-math is not free lunch. Use it with cautions 😲.
Hence check this post 1 to see what innocuous performance speedup or unfortunate downstream effects fast-math would bring to you.
I mean, the whole point of fast-math is trading off speed with correctness. If fast-math was to give always the correct results, it wouldn’t be fast-math, it would be the standard way of doing math. -- Mosè Giordano 2
Footnotes
An Interactive Intro to CRDTs
date: 2023-10-10 · Tags: #til, #good-reading, #devToday, let's enjoy anotehr (previous one is here) amazing interactive visualization of CRDTs1.
Footnotes
Generative AI exists because of the transformer
date: 2023-10-07 · Tags: #news, #aiAn excellent visual article by the Financial Times on how generative AI and the transformer model work. Entry level, but very well done.
Unifying the CUDA C++ Core Libraries
date: 2023-10-07 · Tags: #devWe're excited to announce that the CUDA C++ Core Libraries (CCCL) - Thrust, CUB, and libcudacxx - are now unified under the nvidia/cccl repository.
-- Jake Hemstad (@jrhemstad) on GitHub1
- thrust: The C++ parallel algorithms library.
- cub: Cooperative primitives for CUDA C++.
- libcudacxx: The C++ Standard Library for your entire system.
I delightful love news / work like unifying abstractions. It makes me peace, relaxy and makes everything robuster.
Refs:
- NVIDIA/cccl: CUDA C++ Core Libraries
- Bundle CCCL in CuPy #7851
Footnotes
Epoch in PostgreSQL and Unix
date: 2023-10-03 · Tags: #postgresql, #devToday I got to update my #ObscureKnowledge
that the system epoch (1970-01-01) is not the same as the @PostgreSQL epoch (2000-01-01) to help someone squash a bug.