Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correctly build offload for default OMP_FLAGS_OFFLOAD_* settings #181

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./src/julia/BabelStream.jl
working-directory: ./src/julia/JuliaStream.jl
steps:
- uses: actions/checkout@v4
- name: Setup project
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ BabelStream is currently implemented in the following parallel programming model
- Futhark

This project also contains implementations in alternative languages with different build systems:
* Julia - [BabelStream.jl](./src/julia/BabelStream.jl)
* Julia - [JuliaStream.jl](./src/julia/JuliaStream.jl)
* Java - [java-stream](./src/java/java-stream)
* Scala - [scala-stream](./src/scala/scala-stream)
* Rust - [rust-stream](./src/rust/rust-stream)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "BabelStream"
name = "JuliaStream"
uuid = "1bdcc9b7-f5ed-4705-bc7b-be1b748ec681"
authors = ["Wei-Chen Lin <[email protected]>"]
version = "4.0"
Expand All @@ -16,14 +16,4 @@ ROCKernels = "7eb9e9f0-4bd3-4c4c-8bef-26bd9629d9b9"
oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"

[compat]
AMDGPU = "0.4.8"
ArgParse = "1.1.4"
CUDA = "4.0.1"
CUDAKernels = "0.4.7"
Distributed = "1"
ExprTools = "0.1.10"
KernelAbstractions = "0.8.6"
Parameters = "0.12.3"
ROCKernels = "0.3.5"
oneAPI = "1.0.2"
julia = "1.9"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BabelStream.jl
JuliaStream.jl
==============

This is an implementation of BabelStream in Julia which contains the following variants:
Expand Down Expand Up @@ -35,15 +35,15 @@ A set of reduced dependency projects are available for the following backend and
With Julia on path, run your selected benchmark with:

```shell
> cd BabelStream.jl
> cd JuliaStream.jl
> julia --project=<BACKEND> -e 'import Pkg; Pkg.instantiate()' # only required on first run
> julia --project=<BACKEND> src/<IMPL>Stream.jl
```

For example. to run the CUDA implementation:

```shell
> cd BabelStream.jl
> cd JuliaStream.jl
> julia --project=CUDA -e 'import Pkg; Pkg.instantiate()'
> julia --project=CUDA src/CUDAStream.jl
```
Expand All @@ -61,7 +61,7 @@ There may be instances where some packages are locked to an older version becaus

To run the benchmark using the top-level project, run the benchmark with:
```shell
> cd BabelStream.jl
> cd JuliaStream.jl
> julia --project -e 'import Pkg; Pkg.instantiate()'
> julia --project src/<IMPL>Stream.jl
```
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module BabelStream
module JuliaStream
end

println("Please run benchmarks directly via `julia --project src/<IMPL>Stream.jl`")
println("Please run benchmarks directly via `julia --project src/<IMPL>Stream.jl`")
3 changes: 2 additions & 1 deletion src/omp/model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set(OMP_FLAGS_OFFLOAD_INTEL
set(OMP_FLAGS_OFFLOAD_GNU_NVIDIA
-foffload=nvptx-none)
set(OMP_FLAGS_OFFLOAD_GNU_AMD
-foffload=amdgcn-amdhsa)
-foffload=amdgcn-amdhsa -fcf-protection=none)
set(OMP_FLAGS_OFFLOAD_CLANG_NVIDIA
-fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target=nvptx64-nvidia-cuda)
set(OMP_FLAGS_OFFLOAD_CLANG_AMD
Expand Down Expand Up @@ -165,6 +165,7 @@ macro(setup)
list(APPEND OMP_FLAGS ${OMP_FLAGS_OFFLOAD_${OFFLOAD_VENDOR}})

elseif (LEN EQUAL 2)
register_definitions(OMP_TARGET_GPU)
# offload with <vendor:arch> tuple
list(GET OFFLOAD_TUPLE 0 OFFLOAD_VENDOR)
list(GET OFFLOAD_TUPLE 1 OFFLOAD_ARCH)
Expand Down
Loading