Skip to content

Commit 7e04bad

Browse files
committed
updated README and the CompatHelper
1 parent e47b061 commit 7e04bad

File tree

3 files changed

+68
-21
lines changed

3 files changed

+68
-21
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,43 @@ on:
33
schedule:
44
- cron: 0 0 * * *
55
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
69
jobs:
710
CompatHelper:
811
runs-on: ubuntu-latest
912
steps:
10-
- name: Pkg.add("CompatHelper")
11-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12-
- name: CompatHelper.main()
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
# arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
1342
env:
1443
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1544
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
16-
run: julia -e 'using CompatHelper; CompatHelper.main()'
45+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
*"We need more speed" - Lightning McQueen or Scarface, I don't know*
44

5-
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://anicusan.github.io/AcceleratedKernels.jl/stable/) -->
5+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://anicusan.github.io/AcceleratedKernels.jl/stable/)
66
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://anicusan.github.io/AcceleratedKernels.jl/dev/)
77
<!-- [![Build Status](https://github.com/anicusan/AcceleratedKernels.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/anicusan/AcceleratedKernels.jl/actions/workflows/CI.yml?query=branch%3Amain) -->
88

@@ -41,7 +41,9 @@ Again, this is only possible because of the unique Julia compilation model, the
4141

4242

4343
## 2. Status
44-
This is the very first release of this library; while tests are included for all algorithms, I only ran them locally on the oneAPI (laptop Intel UHD Graphics 620), CUDA (laptop with Nvidia Quadro RTX 4000 and data centre Nvidia A100-40), Metal (Mac M2 and M3), and AMD (data centre AMD MI210) backends. Some kinks might still exist for some platform permutations before a CI is set up. The API may undergo some changes in the following weeks as we discuss it with the Julia community - please join the conversation!
44+
The AcceleratedKernels.jl sorters were adopted as the official [AMDGPU algorithms](https://github.com/JuliaGPU/AMDGPU.jl/pull/688)! The API is starting to stabilise; it follows the Julia standard library fairly closely - additionally exposing all temporary arrays for memory reuse. For any new ideas / requests, please join the conversation on [Julia Discourse](https://discourse.julialang.org/t/ann-acceleratedkernels-jl-cross-architecture-parallel-algorithms-for-julias-gpu-backends/119698/16) or post [an issue](https://github.com/anicusan/AcceleratedKernels.jl/issues).
45+
46+
We have an extensive test suite; however, I only ran them locally on the oneAPI (laptop Intel UHD Graphics 620), CUDA (laptop with Nvidia Quadro RTX 4000 and data centre Nvidia A100-40), Metal (Mac M2 and M3), and AMD (data centre AMD MI210) backends. Some kinks might still exist for some platform / OS permutations before a CI is set up.
4547

4648
AcceleratedKernels.jl will also be a fundamental building block of applications developed at [EvoPhase](https://evophase.co.uk/), so it will see continuous heavy use with industry backing. Long-term stability, performance improvements and support are priorities for us.
4749

prototype/reduce_nd_test.jl

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11

2-
using Random
3-
using BenchmarkTools
4-
using Profile
5-
using PProf
2+
# using Random
3+
# using BenchmarkTools
4+
# using Profile
5+
# using PProf
66

7-
using KernelAbstractions
8-
using Metal
7+
# using KernelAbstractions
8+
# using Metal
99

10-
import AcceleratedKernels as AK
10+
# import AcceleratedKernels as AK
1111

1212

13-
Random.seed!(0)
13+
# Random.seed!(0)
1414

1515

1616

@@ -21,28 +21,44 @@ Random.seed!(0)
2121
# d
2222

2323

24+
using Metal
25+
using KernelAbstractions
26+
import AcceleratedKernels as AK
2427

28+
using BenchmarkTools
29+
using Random
30+
Random.seed!(0)
2531

2632

27-
function redadd_base(s)
28-
d = reduce(+, s; init=zero(eltype(s)), dims=1)
33+
function sum_base(s; dims)
34+
d = reduce(+, s; init=zero(eltype(s)), dims=dims)
2935
KernelAbstractions.synchronize(get_backend(s))
3036
d
3137
end
3238

3339

34-
function redadd_ak(s)
35-
d = AK.reduce(+, s; init=zero(eltype(s)), dims=1)
40+
function sum_ak(s; dims)
41+
d = AK.reduce(+, s; init=zero(eltype(s)), dims=dims)
3642
KernelAbstractions.synchronize(get_backend(s))
3743
d
3844
end
3945

4046

47+
# Make array with highly unequal per-axis sizes
4148
s = MtlArray(rand(Int32(1):Int32(100), 10, 100_000))
42-
@assert redadd_base(s) == redadd_ak(s)
4349

44-
display(@benchmark redadd_base($s))
45-
display(@benchmark redadd_ak($s))
50+
# Correctness
51+
@assert sum_base(s, dims=1) == sum_ak(s, dims=1)
52+
@assert sum_base(s, dims=2) == sum_ak(s, dims=2)
53+
54+
# Benchmarks
55+
println("\nReduction over small axis - AK vs Base")
56+
display(@benchmark sum_ak($s, dims=1))
57+
display(@benchmark sum_base($s, dims=1))
58+
59+
println("\nReduction over long axis - AK vs Base")
60+
display(@benchmark sum_ak($s, dims=2))
61+
display(@benchmark sum_base($s, dims=2))
4662

4763

4864

0 commit comments

Comments
 (0)