Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
81affe2
Add CMake modules to find Bandicoot libraries and includes.
zoq May 8, 2025
c3059c3
Add initial GitHub Actions to build against Bandicoot and run the tests.
zoq May 8, 2025
5a2cc99
1. Add type proxies to select the right type based on the used backen…
zoq May 8, 2025
61bdef8
Refactor CNE optimizer and tests cases to work with Armadillo and Ban…
zoq May 8, 2025
344c17d
Refactor Katyusha optimizer and tests cases to work with Armadillo an…
zoq May 8, 2025
1df8812
Refactor optimizers to work with Armadillo and Bandicoot datatypes:
zoq May 9, 2025
3c19fa9
Refactor optimizers to work with Armadillo and Bandicoot datatypes:
zoq May 13, 2025
2448177
Refactor optimizers to work with Armadillo and Bandicoot datatypes:
zoq May 13, 2025
dcd8875
Use inverse transform sampling to replicating arma::randg sampling si…
zoq May 21, 2025
2f515be
Apply suggestions from code review by @rcurtin.
zoq May 21, 2025
dadca56
Group test cases and fix indentations.
zoq May 21, 2025
7784b15
Update optimizer reference styling.
zoq May 21, 2025
2779deb
Add option to build against Bandicoot (by default we build against Ba…
zoq May 21, 2025
8286511
Mention AugLagrangianType constructor in the optimizer documentation,…
zoq May 21, 2025
3738c82
Use data type specific element type for the bounds parameter.
zoq May 21, 2025
93e963a
Make sure we follow the max character line limitation from the style …
zoq May 21, 2025
ff6ce5e
Remove backports for outdates armadillo versions.
zoq May 21, 2025
9f83931
Indentation fixes.
zoq May 21, 2025
0433639
Indentation fixes.
zoq May 26, 2025
0ffdd79
Use the correct data type during testing.
zoq May 26, 2025
aab9f5e
Do not use the namespace twice.
zoq May 26, 2025
d3fee05
Test against CPU/OpenCL/CUDA backend.
zoq May 26, 2025
3f2f607
Use the correct test case type.
zoq May 27, 2025
2a693ac
We don't need Bandicoot when we test against Armadillo (CPU) backend.
zoq May 27, 2025
abfd69b
Use the correct minimal Bandicoot version.
zoq Jun 3, 2025
67f40be
Comment on the added proxies.
zoq Jun 17, 2025
197ac1a
Merge arma and coot traits into a single file.
zoq Jun 17, 2025
91c64b7
Apply suggestions from code review.
zoq Jul 17, 2025
44b215f
Refactor ForwardType into two different structures to avoid std::cond…
rcurtin Jul 22, 2025
957ab23
Remove unused proxies.
zoq Jul 25, 2025
01ee111
Revert CategoryType to arma::Row<size_t> since that should always sta…
rcurtin Jul 30, 2025
c3af24b
Add convenience IsMatrixType<> struct.
rcurtin Jul 30, 2025
a71f41b
Individually accessed vector, so keep vector on the CPU, for faster a…
zoq Aug 11, 2025
bd44d62
Apply suggestions from code review
zoq Aug 17, 2025
e7c9f18
Kepp the indicies on the CPU.
zoq Aug 17, 2025
048650a
Apply suggestions from code review.
zoq Aug 24, 2025
b3775d5
Remove outdated test case.
zoq Aug 24, 2025
503ecd1
Use initialization list for the velocity vector.
zoq Aug 24, 2025
f597b08
Apply suggestions from code review
zoq Aug 24, 2025
d339032
Readd removed test cases for MOEAD.
zoq Aug 24, 2025
be5f811
Use sort_index for sorting that is supported for both armadillo and b…
zoq Aug 26, 2025
83ab897
Revert changes to Parallel SGD optimizer, no benefit to upload to the…
zoq Aug 26, 2025
040bd44
Only reset if we haven't reached the end of the iterations.
zoq Aug 26, 2025
954fbe5
Use accu to the the sum of the vector.
zoq Aug 26, 2025
6ed7d8a
Use clamp instead of min, for a more efficient computation.
zoq Aug 26, 2025
2b5a38f
Add missing data type.
zoq Aug 26, 2025
f9521ad
Use ENS_HAVE_COOT instead of USE_COOT and automatically detect when B…
rcurtin Aug 26, 2025
e62d607
Fix incorrect initialization list.
rcurtin Aug 26, 2025
74219d2
Remove unnecessary GetFillType<MatType>::zeros, which does not work f…
rcurtin Aug 26, 2025
be1d8fa
Clean up the last few proxy functions.
rcurtin Aug 26, 2025
e2b67b2
Refactor problems to avoid adding extra template parameters.
rcurtin Aug 26, 2025
c8c4fed
NSGA2: introduce a new Optimize function that takes the front and the…
zoq Aug 27, 2025
90da959
MOEAD: introduce a new Optimize function that takes the front and the…
zoq Aug 27, 2025
fa9bbf6
Remove unnecessary lr matrix.
rcurtin Aug 27, 2025
dcbdcdc
Minor cleanups for SA.
rcurtin Aug 27, 2025
7032a78
Clean up member initialization for PSO.
rcurtin Aug 27, 2025
13c228c
Update documentation for multi-objective optimizers.
rcurtin Aug 27, 2025
1d3102c
Update API for Snapshots().
rcurtin Aug 27, 2025
a9ce40c
Keep the MOEAD front indices on the CPU, to be more efficient.
zoq Aug 27, 2025
7442e83
Remove class template parameter for the bound parameter, to make the …
zoq Aug 27, 2025
572abaa
Use the correct location for the bandicoot wrapper.
zoq Aug 28, 2025
8a90b83
No need to set the backend for testing, we will test whatever was ava…
zoq Aug 28, 2025
7375ab3
Use the correct def to enable the bandicoot backend.
zoq Aug 28, 2025
4fdf07c
use the correct name for the def.
zoq Aug 28, 2025
6e5f1e3
Fixes so that Bandicoot actually gets detected and compiled in correc…
rcurtin Aug 28, 2025
3ff00de
Oops, fix merge.
rcurtin Aug 28, 2025
6997f67
Oops, don't forget to resize the responses.
rcurtin Aug 28, 2025
271d273
Add new Optimize(...) method to AGEMOEA that takes the front and pare…
zoq Aug 29, 2025
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
54 changes: 54 additions & 0 deletions .github/workflows/bandicoot-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Test
on: [push, pull_request]

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
outputs:
tag: ${{ steps.git.outputs.tag }}
strategy:
fail-fast: false
matrix:
config:
- { name: 'CUDA', os: self-hosted}
- { name: 'OpenCL', os: self-hosted}
- { name: 'CPU', os: self-hosted}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
cd ../
rm -rf bandicoot-code
git clone --depth 1 --branch 2.1.1 https://gitlab.com/bandicoot-lib/bandicoot-code.git
cd bandicoot-code/
mkdir build/
cd build/

if [[ "${{ matrix.config.name }}" == "CUDA" ]]; then
echo "Installing Bandicoot CUDA"
cmake -DFIND_CUDA=ON -DFIND_OPENCL=OFF -DBUILD_TESTS=OFF ../
make
elif [[ "${{ matrix.config.name }}" == "OpenCL" ]]; then
echo "Installing Bandicoot OpenCL"
cmake -DFIND_CUDA=OFF -DFIND_OPENCL=ON -DBUILD_TESTS=OFF ../
make
fi

- name: Build ensmallen
run: |
mkdir build
cd build/

if [[ "${{ matrix.config.name }}" == "CPU" ]]; then
cmake -DUSE_BANDICOOT=OFF ..
else
cmake -DBANDICOOT_INCLUDE_DIR=../../bandicoot-code/build/tmp/include/ -DBANDICOOT_LIBRARY=../../bandicoot-code/build/libbandicoot.so ..
fi

make ensmallen_tests

- name: Test ensmallen
run: |
cd build/
./ensmallen_tests
44 changes: 44 additions & 0 deletions CMake/COOT_FindCLBLAS.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - Find clBLAS (includes and library)
# This module defines
# CLBLAS_INCLUDE_DIR
# CLBLAS_LIBRARIES
# CLBLAS_FOUND
# also defined, but not for general use are
# CLBLAS_LIBRARY, where to find the library.

find_path(CLBLAS_INCLUDE_DIR clBLAS.h
/usr/include/
/usr/local/include/
)

set(CLBLAS_NAMES ${CLBLAS_NAMES} clBLAS)
find_library(CLBLAS_LIBRARY
NAMES ${CLBLAS_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
)

if (CLBLAS_LIBRARY AND CLBLAS_INCLUDE_DIR)
set(CLBLAS_LIBRARIES ${CLBLAS_LIBRARY})
set(CLBLAS_FOUND "YES")
else ()
set(CLBLAS_FOUND "NO")
endif ()

if (CLBLAS_FOUND)
if (NOT CLBLAS_FIND_QUIETLY)
message(STATUS "Found a clBLAS library: ${CLBLAS_LIBRARIES}")
endif ()
else ()
if (CLBLAS_FIND_REQUIRED)
message(FATAL_ERROR "Could not find a clBLAS library")
endif ()
endif ()

# Deprecated declarations.
set (NATIVE_CLBLAS_INCLUDE_PATH ${CLBLAS_INCLUDE_DIR} )
get_filename_component (NATIVE_CLBLAS_LIB_PATH ${CLBLAS_LIBRARY} PATH)

mark_as_advanced(
CLBLAS_LIBRARY
CLBLAS_INCLUDE_DIR
)
44 changes: 44 additions & 0 deletions CMake/COOT_FindCLBlast.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - Find clBlast (includes and library)
Comment thread
rcurtin marked this conversation as resolved.
# This module defines
# CLBLAST_INCLUDE_DIR
# CLBLAST_LIBRARIES
# CLBLAST_FOUND
# also defined, but not for general use are
# CLBLAST_LIBRARY, where to find the library.

find_path(CLBLAST_INCLUDE_DIR clblast.h
/usr/include/
/usr/local/include/
)

set(CLBLAST_NAMES ${CLBLAST_NAMES} clblast)
find_library(CLBLAST_LIBRARY
NAMES ${CLBLAST_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib
)

if (CLBLAST_LIBRARY AND CLBLAST_INCLUDE_DIR)
set(CLBLAST_LIBRARIES ${CLBLAST_LIBRARY})
set(CLBLAST_FOUND "YES")
else ()
set(CLBLAST_FOUND "NO")
endif ()

if (CLBLAST_FOUND)
if (NOT CLBLAST_FIND_QUIETLY)
message(STATUS "Found a clBlast library: ${CLBLAST_LIBRARIES}")
endif ()
else ()
if (CLBLAST_FIND_REQUIRED)
message(FATAL_ERROR "Could not find a clBlast library")
endif ()
endif ()

# Deprecated declarations.
set (NATIVE_CLBLAST_INCLUDE_PATH ${CLBLAST_INCLUDE_DIR} )
get_filename_component (NATIVE_CLBLAST_LIB_PATH ${CLBLAST_LIBRARY} PATH)

mark_as_advanced(
CLBLAST_LIBRARY
CLBLAST_INCLUDE_DIR
)
35 changes: 35 additions & 0 deletions CMake/COOT_FindNVRTC.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# - Find clBlast (includes and library)
# This module defines
# CLBLAST_INCLUDE_DIR
# CLBLAST_LIBRARIES
# CLBLAST_FOUND
# also defined, but not for general use are
# CLBLAST_LIBRARY, where to find the library.

set(NVRTC_NAMES ${NVRTC_NAMES} nvrtc)
find_library(NVRTC_LIBRARY
NAMES ${NVRTC_NAMES}
PATHS /usr/lib64/ /usr/local/lib64/ /usr/lib /usr/local/lib /usr/lib/x86_64-linux-gnu/
)

if (NVRTC_LIBRARY)
set(NVRTC_LIBRARIES ${NVRTC_LIBRARY})
set(NVRTC_FOUND "YES")
else ()
set(NVRTC_FOUND "NO")
endif ()

if (NVRTC_FOUND)
if (NOT NVRTC_FIND_QUIETLY)
message(STATUS "Found NVRTC library: ${NVRTC_LIBRARIES}")
endif ()
else ()
if (NVRTC_FIND_REQUIRED)
message(FATAL_ERROR "Could not find NVRTC library")
endif ()
endif ()

# Deprecated declarations.
get_filename_component (NATIVE_NVRTC_LIB_PATH ${NVRTC_LIBRARY} PATH)

mark_as_advanced(NVRTC_LIBRARY)
Loading
Loading