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

Drop OCCA backends #1007

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 1 addition & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,14 @@ noether-cpu:
# -- LIBXSMM v1.17
- cd .. && export XSMM_VERSION=libxsmm-1.17 && { [[ -d $XSMM_VERSION ]] || { git clone --depth 1 --branch 1.17 https://github.com/hfp/libxsmm.git $XSMM_VERSION && make -C $XSMM_VERSION -j$(nproc); }; } && export XSMM_DIR=$PWD/$XSMM_VERSION && cd libCEED
- echo "-------------- LIBXSMM -------------" && git -C $XSMM_DIR describe --tags
# -- OCCA v1.1.0
- cd .. && export OCCA_VERSION=occa-1.1.0 OCCA_OPENCL_ENABLED=0 && { [[ -d $OCCA_VERSION ]] || { git clone --depth 1 --branch v1.1.0 https://github.com/libocca/occa.git $OCCA_VERSION && make -C $OCCA_VERSION -j$(nproc); }; } && export OCCA_DIR=$PWD/$OCCA_VERSION && cd libCEED
- echo "-------------- OCCA ----------------" && make -C $OCCA_DIR info
script:
- rm -f .SUCCESS
# libCEED
- make configure OPT='-O -march=native -ffp-contract=fast'
# Note: OCCA backends currently disabled in CI
- BACKENDS_CPU=$(OCCA_DIR= make info-backends-all | grep -o '/cpu[^ ]*')
- BACKENDS_CPU=$(make info-backends-all | grep -o '/cpu[^ ]*')
- echo "-------------- libCEED -------------" && make info
- echo "-------------- BACKENDS_CPU --------" && echo $BACKENDS_CPU
- make -j$NPROC_CPU
# Remove OCCA after verifying it compiles
# CodeCov of OCCA backend not useful since testing is intentionally disabled
- export OCCA_DIR= && make -j$NPROC_CPU -W build/interface/ceed-register.o
# -- libCEED only tests
- echo "-------------- core tests ----------"
- echo '[{"subject":"/","metrics":[{"name":"Transfer Size (KB)","value":"19.5","desiredSize":"smaller"},{"name":"Speed Index","value":0,"desiredSize":"smaller"},{"name":"Total Score","value":92,"desiredSize":"larger"},{"name":"Requests","value":4,"desiredSize":"smaller"}]}]' > performance.json
Expand Down
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ export CEED_DIR = $(abspath .)
# XSMM_DIR env variable should point to XSMM master (github.com/hfp/libxsmm)
XSMM_DIR ?= ../libxsmm

# OCCA_DIR env variable should point to OCCA master (github.com/libocca/occa)
OCCA_DIR ?= ../occa

# env variable MAGMA_DIR can be used too
MAGMA_DIR ?= ../magma

Expand Down Expand Up @@ -216,7 +213,7 @@ fluidsexamples := $(fluidsexamples.c:examples/fluids/%.c=$(OBJDIR)/fluids-%)
solidsexamples.c := $(sort $(wildcard examples/solids/*.c))
solidsexamples := $(solidsexamples.c:examples/solids/%.c=$(OBJDIR)/solids-%)

# Backends/[ref, blocked, memcheck, opt, avx, occa, magma]
# Backends/[ref, blocked, memcheck, opt, avx, magma]
ref.c := $(sort $(wildcard backends/ref/*.c))
blocked.c := $(sort $(wildcard backends/blocked/*.c))
ceedmemcheck.c := $(sort $(wildcard backends/memcheck/*.c))
Expand All @@ -232,7 +229,6 @@ cuda-shared.cu := $(sort $(wildcard backends/cuda-shared/kernels/*.cu))
cuda-gen.c := $(sort $(wildcard backends/cuda-gen/*.c))
cuda-gen.cpp := $(sort $(wildcard backends/cuda-gen/*.cpp))
cuda-gen.cu := $(sort $(wildcard backends/cuda-gen/kernels/*.cu))
occa.cpp := $(sort $(shell find backends/occa -type f -name *.cpp))
magma.c := $(sort $(wildcard backends/magma/*.c))
magma.cu := $(sort $(wildcard backends/magma/kernels/cuda/*.cu))
magma.hip := $(sort $(wildcard backends/magma/kernels/hip/*.hip.cpp))
Expand Down Expand Up @@ -363,22 +359,6 @@ ifneq ($(wildcard $(XSMM_DIR)/lib/libxsmm.*),)
BACKENDS_MAKE += $(XSMM_BACKENDS)
endif

# OCCA Backends
OCCA_BACKENDS = /cpu/self/occa
ifneq ($(wildcard $(OCCA_DIR)/lib/libocca.*),)
OCCA_MODES := $(shell $(OCCA_DIR)/bin/occa modes)
OCCA_BACKENDS += $(if $(filter OpenMP,$(OCCA_MODES)),/cpu/openmp/occa)
# OCCA_BACKENDS += $(if $(filter OpenCL,$(OCCA_MODES)),/gpu/opencl/occa)
OCCA_BACKENDS += $(if $(filter HIP,$(OCCA_MODES)),/gpu/hip/occa)
OCCA_BACKENDS += $(if $(filter CUDA,$(OCCA_MODES)),/gpu/cuda/occa)

$(libceeds) : CPPFLAGS += -I$(OCCA_DIR)/include
PKG_LIBS += -L$(abspath $(OCCA_DIR))/lib -locca
LIBCEED_CONTAINS_CXX = 1
libceed.cpp += $(occa.cpp)
BACKENDS_MAKE += $(OCCA_BACKENDS)
endif

# CUDA Backends
CUDA_LIB_DIR := $(wildcard $(foreach d,lib lib64,$(CUDA_DIR)/$d/libcudart.${SO_EXT}))
CUDA_LIB_DIR := $(patsubst %/,%,$(dir $(firstword $(CUDA_LIB_DIR))))
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@ There are multiple supported backends, which can be selected at runtime in the e
| `/gpu/cuda/magma/det` | CUDA MAGMA kernels | Yes |
| `/gpu/hip/magma` | HIP MAGMA kernels | No |
| `/gpu/hip/magma/det` | HIP MAGMA kernels | Yes |
||
| **OCCA** |
| `/*/occa` | Selects backend based on available OCCA modes | Yes |
| `/cpu/self/occa` | OCCA backend with serial CPU kernels | Yes |
| `/cpu/openmp/occa` | OCCA backend with OpenMP kernels | Yes |
| `/gpu/cuda/occa` | OCCA backend with CUDA kernels | Yes |
| `/gpu/hip/occa`~ | OCCA backend with HIP kernels | Yes |

The `/cpu/self/*/serial` backends process one element at a time and are intended for meshes with a smaller number of high order elements.
The `/cpu/self/*/blocked` backends process blocked batches of eight interlaced elements and are intended for meshes with higher numbers of elements.
Expand Down Expand Up @@ -196,14 +189,6 @@ For example:

> - `/gpu/cuda/gen:device_id=1`

The `/*/occa` backends rely upon the [OCCA](http://github.com/libocca/occa) package to provide cross platform performance.
To enable the OCCA backend, the environment variable `OCCA_DIR` must point to the top-level OCCA directory, with the OCCA library located in the `${OCCA_DIR}/lib` (By default, `OCCA_DIR` is set to `../occa`).

Additionally, users can pass specific OCCA device properties after setting the CEED resource.
For example:

> - `"/*/occa:mode='CUDA',device_id=0"`

Bit-for-bit reproducibility is important in some applications.
However, some libCEED backends use non-deterministic operations, such as `atomicAdd` for increased performance.
The backends which are capable of generating reproducible results, with the proper compilation options, are highlighted in the list above.
Expand Down
1 change: 0 additions & 1 deletion backends/ceed-backend-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ MACRO(CeedRegister_Magma, 2, "/gpu/cuda/magma", "/gpu/hip/magma")
MACRO(CeedRegister_Magma_Det, 2, "/gpu/cuda/magma/det", "/gpu/hip/magma/det")
MACRO(CeedRegister_Memcheck_Blocked, 1, "/cpu/self/memcheck/blocked")
MACRO(CeedRegister_Memcheck_Serial, 1, "/cpu/self/memcheck/serial")
MACRO(CeedRegister_Occa, 4, "/cpu/self/occa", "/cpu/openmp/occa", "/gpu/hip/occa", "/gpu/cuda/occa")
MACRO(CeedRegister_Opt_Blocked, 1, "/cpu/self/opt/blocked")
MACRO(CeedRegister_Opt_Serial, 1, "/cpu/self/opt/serial")
MACRO(CeedRegister_Ref, 1, "/cpu/self/ref/serial")
Expand Down
104 changes: 0 additions & 104 deletions backends/occa/ceed-occa-basis.cpp

This file was deleted.

70 changes: 0 additions & 70 deletions backends/occa/ceed-occa-basis.hpp

This file was deleted.

48 changes: 0 additions & 48 deletions backends/occa/ceed-occa-ceed-object.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions backends/occa/ceed-occa-ceed-object.hpp

This file was deleted.

Loading