|
|
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| .JuliaFormatter.toml | ||
| Manifest.toml | ||
| Project.toml | ||
| README.md | ||
JuliaStream.jl
This is an implementation of BabelStream in Julia which contains the following variants:
PlainStream.jl- Single threadedforThreadedStream.jl- Threaded implementation withThreads.@threadsmacrosDistributedStream.jl- Process based parallelism with@distributedmacrosCUDAStream.jl- Direct port of BabelStream's native CUDA implementation using CUDA.jlAMDGPUStream.jl- Direct port of BabelStream's native HIP implementation using AMDGPU.jl
Build & Run
Prerequisites
- Julia 1.6+
With Julia on path, run the benchmark with:
> cd JuliaStream.jl
> julia --project -e 'import Pkg; Pkg.instantiate()' # only required on first run
> julia --project src/<IMPL>Stream.jl
Important:
- Julia is 1-indexed, so N > 1 in
--device N - Thread count for
ThreadedStreammust be set via theJULIA_NUM_THREADSenvironment variable (e.gexport JULIA_NUM_THREADS=$(nproc)) otherwise it defaults to 1 DistributedStreamusesaddprocs()call directly which defaults to$(nproc), do not use the-p <N>flag as per the documentation.- Certain implementations such as CUDA and AMDGPU will do hardware detection at runtime and may download and/or compile further software packages for the platform.