Skip to content

Commit b899e1b

Browse files
committed
Merge remote-tracking branch 'origin/master' into HEAD
2 parents b678088 + 9fa90f1 commit b899e1b

273 files changed

Lines changed: 11197 additions & 7055 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ build_script:
3333
-DLAPACK_LIBRARY:FILEPATH=%BLAS_LIBRARY%
3434
-DCMAKE_PREFIX:FILEPATH="%APPVEYOR_BUILD_FOLDER%/armadillo"
3535
-DBUILD_SHARED_LIBS=OFF
36+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
3637
-DCMAKE_BUILD_TYPE=Release ..
3738
- >
3839
"%MSBUILD%" "armadillo.sln"
@@ -47,6 +48,7 @@ build_script:
4748
-DARMADILLO_LIBRARIES=%BLAS_LIBRARY%
4849
-DLAPACK_LIBRARY=%BLAS_LIBRARY%
4950
-DBLAS_LIBRARY=%BLAS_LIBRARY%
51+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
5052
-DCMAKE_BUILD_TYPE=Release ..
5153
- >
5254
"%MSBUILD%" "ensmallen.sln"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Test
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
name: ${{ matrix.config.name }}
7+
runs-on: ${{ matrix.config.os }}
8+
outputs:
9+
tag: ${{ steps.git.outputs.tag }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
config:
14+
- { name: 'CUDA', os: self-hosted}
15+
- { name: 'OpenCL', os: self-hosted}
16+
- { name: 'CPU', os: self-hosted}
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Install Dependencies
20+
run: |
21+
cd ../
22+
rm -rf bandicoot-code
23+
git clone --depth 1 --branch 2.1.1 https://gitlab.com/bandicoot-lib/bandicoot-code.git
24+
cd bandicoot-code/
25+
mkdir build/
26+
cd build/
27+
28+
if [[ "${{ matrix.config.name }}" == "CUDA" ]]; then
29+
echo "Installing Bandicoot CUDA"
30+
cmake -DFIND_CUDA=ON -DFIND_OPENCL=OFF -DBUILD_TESTS=OFF ../
31+
make
32+
elif [[ "${{ matrix.config.name }}" == "OpenCL" ]]; then
33+
echo "Installing Bandicoot OpenCL"
34+
cmake -DFIND_CUDA=OFF -DFIND_OPENCL=ON -DBUILD_TESTS=OFF ../
35+
make
36+
fi
37+
38+
- name: Build ensmallen
39+
run: |
40+
mkdir build
41+
cd build/
42+
43+
if [[ "${{ matrix.config.name }}" == "CPU" ]]; then
44+
cmake -DUSE_BANDICOOT=OFF ..
45+
else
46+
cmake -DBANDICOOT_INCLUDE_DIR=../../bandicoot-code/build/tmp/include/ -DBANDICOOT_LIBRARY=../../bandicoot-code/build/libbandicoot.so ..
47+
fi
48+
49+
make ensmallen_tests
50+
51+
- name: Test ensmallen
52+
run: |
53+
cd build/
54+
./ensmallen_tests -d yes

CMake/COOT_FindCLBLAS.cmake

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# - Find clBLAS (includes and library)
2+
# This module defines
3+
# CLBLAS_INCLUDE_DIR
4+
# CLBLAS_LIBRARIES
5+
# CLBLAS_FOUND
6+
# also defined, but not for general use are
7+
# CLBLAS_LIBRARY, where to find the library.
8+
9+
find_path(CLBLAS_INCLUDE_DIR clBLAS.h
10+
/usr/include/
11+
/usr/local/include/
12+
)
13+
14+
set(CLBLAS_NAMES ${CLBLAS_NAMES} clBLAS)
15+
find_library(CLBLAS_LIBRARY
16+
NAMES ${CLBLAS_NAMES}
17+
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
18+
)
19+
20+
if (CLBLAS_LIBRARY AND CLBLAS_INCLUDE_DIR)
21+
set(CLBLAS_LIBRARIES ${CLBLAS_LIBRARY})
22+
set(CLBLAS_FOUND "YES")
23+
else ()
24+
set(CLBLAS_FOUND "NO")
25+
endif ()
26+
27+
if (CLBLAS_FOUND)
28+
if (NOT CLBLAS_FIND_QUIETLY)
29+
message(STATUS "Found a clBLAS library: ${CLBLAS_LIBRARIES}")
30+
endif ()
31+
else ()
32+
if (CLBLAS_FIND_REQUIRED)
33+
message(FATAL_ERROR "Could not find a clBLAS library")
34+
endif ()
35+
endif ()
36+
37+
# Deprecated declarations.
38+
set (NATIVE_CLBLAS_INCLUDE_PATH ${CLBLAS_INCLUDE_DIR} )
39+
get_filename_component (NATIVE_CLBLAS_LIB_PATH ${CLBLAS_LIBRARY} PATH)
40+
41+
mark_as_advanced(
42+
CLBLAS_LIBRARY
43+
CLBLAS_INCLUDE_DIR
44+
)

CMake/COOT_FindCLBlast.cmake

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# - Find clBlast (includes and library)
2+
# This module defines
3+
# CLBLAST_INCLUDE_DIR
4+
# CLBLAST_LIBRARIES
5+
# CLBLAST_FOUND
6+
# also defined, but not for general use are
7+
# CLBLAST_LIBRARY, where to find the library.
8+
9+
find_path(CLBLAST_INCLUDE_DIR clblast.h
10+
/usr/include/
11+
/usr/local/include/
12+
)
13+
14+
set(CLBLAST_NAMES ${CLBLAST_NAMES} clblast)
15+
find_library(CLBLAST_LIBRARY
16+
NAMES ${CLBLAST_NAMES}
17+
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
18+
)
19+
20+
if (CLBLAST_LIBRARY AND CLBLAST_INCLUDE_DIR)
21+
set(CLBLAST_LIBRARIES ${CLBLAST_LIBRARY})
22+
set(CLBLAST_FOUND "YES")
23+
else ()
24+
set(CLBLAST_FOUND "NO")
25+
endif ()
26+
27+
if (CLBLAST_FOUND)
28+
if (NOT CLBLAST_FIND_QUIETLY)
29+
message(STATUS "Found a clBlast library: ${CLBLAST_LIBRARIES}")
30+
endif ()
31+
else ()
32+
if (CLBLAST_FIND_REQUIRED)
33+
message(FATAL_ERROR "Could not find a clBlast library")
34+
endif ()
35+
endif ()
36+
37+
# Deprecated declarations.
38+
set (NATIVE_CLBLAST_INCLUDE_PATH ${CLBLAST_INCLUDE_DIR} )
39+
get_filename_component (NATIVE_CLBLAST_LIB_PATH ${CLBLAST_LIBRARY} PATH)
40+
41+
mark_as_advanced(
42+
CLBLAST_LIBRARY
43+
CLBLAST_INCLUDE_DIR
44+
)

CMake/COOT_FindNVRTC.cmake

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# - Find clBlast (includes and library)
2+
# This module defines
3+
# CLBLAST_INCLUDE_DIR
4+
# CLBLAST_LIBRARIES
5+
# CLBLAST_FOUND
6+
# also defined, but not for general use are
7+
# CLBLAST_LIBRARY, where to find the library.
8+
9+
set(NVRTC_NAMES ${NVRTC_NAMES} nvrtc)
10+
find_library(NVRTC_LIBRARY
11+
NAMES ${NVRTC_NAMES}
12+
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu/
13+
)
14+
15+
if (NVRTC_LIBRARY)
16+
set(NVRTC_LIBRARIES ${NVRTC_LIBRARY})
17+
set(NVRTC_FOUND "YES")
18+
else ()
19+
set(NVRTC_FOUND "NO")
20+
endif ()
21+
22+
if (NVRTC_FOUND)
23+
if (NOT NVRTC_FIND_QUIETLY)
24+
message(STATUS "Found NVRTC library: ${NVRTC_LIBRARIES}")
25+
endif ()
26+
else ()
27+
if (NVRTC_FIND_REQUIRED)
28+
message(FATAL_ERROR "Could not find NVRTC library")
29+
endif ()
30+
endif ()
31+
32+
# Deprecated declarations.
33+
get_filename_component (NATIVE_NVRTC_LIB_PATH ${NVRTC_LIBRARY} PATH)
34+
35+
mark_as_advanced(NVRTC_LIBRARY)

0 commit comments

Comments
 (0)