Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
300f21b
Initial implementation for ALPAKA integration to SOFIE
sanjibansg Apr 11, 2025
fc9846c
GPU ALPAKA Support in GEMM
sanjibansg Apr 11, 2025
419b354
fix: errors with the generation function
sanjibansg Apr 11, 2025
6481c05
fix: defining intermediate and initialized tensors
sanjibansg Aug 18, 2025
e31303f
feat: use sofieblas efficiently and add leaky relu, sigmoid support
sanjibansg Oct 14, 2025
afae7c3
feat: add basic binary kernel
sanjibansg Oct 17, 2025
c845fe7
feat: add cast kernel
sanjibansg Oct 17, 2025
3d9f812
feat: add squeeze, unsqueeze, flatten and reshape
sanjibansg Oct 21, 2025
284405e
feat: add support for basic unary
sanjibansg Oct 21, 2025
d64a40f
feat: add support for Constant operator
sanjibansg Oct 21, 2025
ac8d662
feat: add support for shape operator
sanjibansg Oct 22, 2025
d75eac3
feat: add support for Basic Binary operations
sanjibansg Nov 20, 2025
f7e44ad
fix: compilation issues due to faulty rebase
sanjibansg Nov 23, 2025
b4cd917
fix: parameteric inputs for range operator
sanjibansg Nov 23, 2025
2016794
fix: linking issue because of incorrect symbols
sanjibansg Nov 24, 2025
f35d9d9
fix: cmake script for tests
sanjibansg Nov 27, 2025
cdc6a9f
fix: define failures in EmitFromRoot.cxx.in (#6)
Saransh-cpp Dec 2, 2025
3ffbe46
fix: layout inconsistencies in alpaka code generation
sanjibansg Dec 14, 2025
1979a11
feat: turn off emitting from ROOT files and skip tests with multiple …
sanjibansg Dec 15, 2025
59aeac4
feat: support for google tests for inference code with alpaka impleme…
sanjibansg Dec 15, 2025
815a80c
feat: test cases for leaky relu operator
sanjibansg Jan 26, 2026
671b4b0
fix: sigmoid operator gpu implementation and test
sanjibansg Jan 26, 2026
2fe07bb
feat: Support for heterogeneous inference of transpose operator
sanjibansg Mar 3, 2026
ccebeb3
feat: Support for heterogeneous inference on concat operator
sanjibansg Mar 5, 2026
4b179ea
feat: Support for heterogeneous inference on scatter elements operator
sanjibansg Mar 5, 2026
50d478e
fix: split operator implementation and multiple buffer return
sanjibansg Mar 9, 2026
5af24cf
feat: Support for heterogeneous inference on tile operator
sanjibansg Mar 12, 2026
6dac663
feat: tests for heterogeneous inference of Gather operator
sanjibansg Mar 13, 2026
0d205e9
feat: tests for heterogeneous inference of Expand operator
sanjibansg Mar 16, 2026
1f0ebc6
feat: Support for heterogeneous inference on gathernd operator
sanjibansg Mar 16, 2026
19cdc11
fix: tensor management for expand and cast operators
sanjibansg Mar 19, 2026
c3b892a
feat: alpaka wait only before blas calls
sanjibansg Mar 30, 2026
ba9643e
feat: Support for heterogeneous inference on comparison operators
sanjibansg Apr 13, 2026
6ba3f29
feat: Support for heterogeneous inference for slice and unary operators
sanjibansg Apr 13, 2026
7f27cd4
feat: Support for heterogeneous inference for where operator
sanjibansg Apr 13, 2026
860d34f
feat: Support for heterogeneous inference for reduce and softplus ope…
sanjibansg Apr 13, 2026
4433ca2
feat: Make ROOT usage optional
sanjibansg Apr 28, 2026
dae834e
feat: Support for heterogeneous inference for Conv operator
sanjibansg May 7, 2026
2b6ede3
feat: infer methods using alpaka views
sanjibansg May 11, 2026
ff9d6cf
feat: Support for inference on batchnorm operator
sanjibansg May 11, 2026
16d8fab
feat: fusion
sanjibansg May 19, 2026
21740c6
fix: several fixes with operator initialization and cpu generation
sanjibansg May 21, 2026
2a98dca
feat: project restructure and benchmark tool
sanjibansg May 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
85 changes: 70 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ project(Sofie
DESCRIPTION "SOFIE"
LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

find_package(BLAS)
if(NOT BLAS_FOUND)
message(WARNING "BLAS not found: TMVA-SOFIE will not be fully tested")
message(WARNING "BLAS not found: sofie will not be fully tested")
endif()

message(STATUS "Looking for Protobuf")
Expand All @@ -17,49 +24,97 @@ if(NOT Protobuf_FOUND)
endif()
if(NOT Protobuf_FOUND)
if(fail-on-missing)
message(FATAL_ERROR "Protobuf libraries not found and they are required (tmva-sofie option enabled)")
message(FATAL_ERROR "Protobuf libraries not found and they are required (sofie option enabled)")
else()
message(STATUS "Protobuf not found. Switching off tmva-sofie option")
message(STATUS "Protobuf not found. Switching off sofie option")
message(FATAL_ERROR "SOFIE cannot be installed without Protobuf")
endif()
else()
if(Protobuf_VERSION LESS 3.0)
if(fail-on-missing)
message(FATAL_ERROR "Protobuf libraries found but is less than the version required (3.0) (tmva-sofie option enabled)")
message(FATAL_ERROR "Protobuf libraries found but is less than the version required (3.0) (sofie option enabled)")
else()
message(STATUS "Protobuf found but its version is not high enough (>3.0). Switching off tmva-sofie option")
message(STATUS "Protobuf found but its version is not high enough (>3.0). Switching off sofie option")
message(FATAL_ERROR "SOFIE cannot be installed without Protobuf")
endif()
else()
if(NOT TARGET protobuf::protoc)
if(fail-on-missing)
message(FATAL_ERROR "Protobuf compiler not found (tmva-sofie option enabled)")
message(FATAL_ERROR "Protobuf compiler not found (sofie option enabled)")
else()
message(STATUS "Protobuf compiler not found. Switching off tmva-sofie option")
message(STATUS "Protobuf compiler not found. Switching off sofie option")
message(FATAL_ERROR "SOFIE cannot be installed without Protobuf")
endif()
endif()
endif()
endif()

find_package(ROOT REQUIRED COMPONENTS Core TMVA Tree)
include(${ROOT_USE_FILE})
option(SOFIE_WITH_ROOT "Enable ROOT support (required for .root weight files and ROOT serialization)" OFF)

if(SOFIE_WITH_ROOT)
find_package(ROOT REQUIRED COMPONENTS Core TMVA Tree)
if(ROOT_FOUND)
include(${ROOT_USE_FILE})
message(STATUS "ROOT found: enabling ROOT support in SOFIE")
else()
message(FATAL_ERROR "SOFIE_WITH_ROOT is ON but ROOT was not found")
endif()
else()
message(STATUS "Building SOFIE without ROOT support (SOFIE_WITH_ROOT=OFF)")
endif()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "header files")
set(CMAKE_INSTALL_LIBDIR "lib" CACHE PATH "libraries")

if(ccache)
set(CMAKE_C_COMPILER_LAUNCHER ccache)
set(CMAKE_CXX_COMPILER_LAUNCHER ccache)
endif()

option(testing "Build and run tests" OFF)
if(testing)
find_package(GTest REQUIRED)
find_package(GTest REQUIRED)
enable_testing()
endif()

include(cmake/modules/RoottestMacros.cmake)
option(SOFIE_BENCHMARK "Build the SOFIE CUDA benchmark toolkit" OFF)

if(SOFIE_WITH_ROOT AND ROOT_FOUND)
include(cmake/modules/RoottestMacros.cmake)
else()
include(cmake/modules/SofieTestMacros.cmake)
endif()

add_subdirectory(utils)
add_subdirectory(core)
add_subdirectory(parsers)

if(SOFIE_BENCHMARK)
add_subdirectory(benchmark)
endif()

# ── Install cmake package config files ──────────────────────────────────────

configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/SOFIEConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/SOFIEConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SOFIE
)

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/SOFIEConfigVersion.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)

install(
EXPORT SOFIETargets
FILE SOFIETargets.cmake
NAMESPACE SOFIE::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SOFIE
)

add_subdirectory(src)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/SOFIEConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/SOFIEConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SOFIE
)
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ Since SOFIE is a part of ROOT and therefore needs to be built altogether, it tak

## Installation

1. Getting a ROOT binary.
Download a pre-built binary of ROOT based on your architecture from [here](https://root.cern/install/).
1. SOFIE requires ROOT by default. To explore SOFIE APIs within ROOT, follow the mentioned steps:
1. Getting a ROOT binary. Download a pre-built binary of ROOT based on your architecture from [here](https://root.cern/install/).
2. Source it so that SOFIE is able to include its code. For example:
```
source root_v6.36.02.Linux-ubuntu24.04-x86_64-gcc13.3/root/bin/thisroot.sh
```
To disable ROOT, simply disable the `-DSOFIE_WITH_ROOT=OFF` cmake flag in the build command.

2. Build standalone SOFIE
```bash
Expand All @@ -23,9 +28,13 @@ The commands above should build the SOFIE standalone. To include it within the R
source setup.sh

```
Now ROOT should also access the SOFIE libraries while it runs. This helps to accelerate development. Submit your developments here and we will proceed with the developments in ROOT carefull.

Now ROOT should also access the SOFIE libraries while it runs. This helps to accelerate development. Submit your developments here and we will proceed with the developments in ROOT carefully. This step is not required if SOFIE is built for usage without ROOT (`-DSOFIE_WITH_ROOT=OFF`).

3. To enable testing generated code with alpaka implementations, build using the following command:
```bash
cmake -Dtesting=ON -DENABLE_ALPAKA_TESTS=ON -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
```
The default architecture is CUDA, but can be configured using an additional`-DALPAKA_BACKEND=hip` cmake option.

## Inspiration
The standalone version of SOFIE is developed with inspiration from the standalone version of RooFit developed by Jonas Rembser that can be found [here](https://github.com/guitargeek/roofit).
Loading