diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5877246..94bc64f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: version: - '1.0' - '1' - - 'nightly' os: - ubuntu-latest - macOS-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 6227455..229ce54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [0.1.6] - Unreleased +### Added + +- Support half precision (Float16). Many thanks to milankl (#31) + ### Changed - Updated CompatHelper setup -- Updated compatibility bounds (#34) +- Updated compatibility bounds (#34, #36) diff --git a/test/runtests.jl b/test/runtests.jl index 6244c2a..cefbe59 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -93,6 +93,28 @@ GFlops.times(::BenchmarkTools.Trial) = [2.0, 3.0] end end + @testset "mul+add 16" begin + let N = 100 + a = Float16(2.5) + x = rand(Float16, N) + y = similar(x) + + cnt = @count_ops my_axpy!(a, x, y) + @test cnt.add16 == N + @test cnt.mul16 == N + @test GFlops.flop(cnt) == 2*N + + + m = rand(Float16, N, N) + v = rand(Float16, N) + + cnt = @count_ops(my_prod(m, v)) + @test cnt.add16 == N*N + @test cnt.mul16 == N*N + @test GFlops.flop(cnt) == 2*N*N + end + end + @testset "neg" begin let cnt = @count_ops -(4.2) @test cnt.neg64 == 1