Skip to content
Merged
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
7 changes: 7 additions & 0 deletions cmake/modules/SearchInstalledSoftware.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1715,6 +1715,13 @@ if(tmva)
message(STATUS "TMVA: Numpy or Python development package not found for python ${Python3_EXECUTABLE}. Switching off tmva-pymva option")
set(tmva-pymva OFF CACHE BOOL "Disabled because Numpy or Python development package were not found (${tmva-pymva_description})" FORCE)
endif()
if(testing)
message(STATUS "Looking for BLAS as an optional testing dependency of PyMVA")
find_package(BLAS)
if(NOT BLAS_FOUND)
message(WARNING "BLAS not found: PyMVA will not be fully tested")
endif()
endif()
endif()
if (R_FOUND)
#Rmva is enable when r is found and tmva is on
Expand Down
48 changes: 26 additions & 22 deletions tmva/pymva/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,19 @@ if(PY_TORCH_FOUND)

# Test RModelParser_PyTorch

ROOT_ADD_GTEST(TestRModelParserPyTorch TestRModelParserPyTorch.C
LIBRARIES
ROOTTMVASofie
TMVA
Python3::NumPy
Python3::Python
INCLUDE_DIRS
SYSTEM
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(TestRModelParserPyTorch ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES})
if(BLAS_FOUND)
ROOT_ADD_GTEST(TestRModelParserPyTorch TestRModelParserPyTorch.C
LIBRARIES
ROOTTMVASofie
TMVA
Python3::NumPy
Python3::Python
BLAS::BLAS
INCLUDE_DIRS
SYSTEM
${CMAKE_CURRENT_BINARY_DIR}
)
endif()

endif(PY_TORCH_FOUND)

Expand Down Expand Up @@ -127,16 +129,18 @@ if((PY_KERAS_FOUND AND PY_THEANO_FOUND) OR (PY_KERAS_FOUND AND PY_TENSORFLOW_FOU
LIBRARIES ${Libraries})
ROOT_ADD_TEST(PyMVA-Keras-Multiclass COMMAND testPyKerasMulticlass DEPENDS ${PyMVA-Keras-Multiclass-depends})

ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C
LIBRARIES
ROOTTMVASofie
PyMVA
Python3::NumPy
Python3::Python
INCLUDE_DIRS
SYSTEM
${CMAKE_CURRENT_BINARY_DIR}
)
target_link_libraries(TestRModelParserKeras ${BLAS_LINKER_FLAGS} ${BLAS_LIBRARIES})
if(BLAS_FOUND)
ROOT_ADD_GTEST(TestRModelParserKeras TestRModelParserKeras.C
LIBRARIES
ROOTTMVASofie
PyMVA
Python3::NumPy
Python3::Python
BLAS::BLAS
INCLUDE_DIRS
SYSTEM
${CMAKE_CURRENT_BINARY_DIR}
)
endif()

endif((PY_KERAS_FOUND AND PY_THEANO_FOUND) OR (PY_KERAS_FOUND AND PY_TENSORFLOW_FOUND))
5 changes: 5 additions & 0 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ else()
find_python_module(graph_nets QUIET)
find_python_module(sklearn QUIET)
endif()
if (NOT BLAS_FOUND)
list(APPEND tmva_veto machine_learning/TMVA_SOFIE_GNN_Application.C)
list(APPEND tmva_veto machine_learning/TMVA_SOFIE_RDataFrame.C)
list(APPEND tmva_veto machine_learning/TMVA_SOFIE_RSofieReader.C)
endif()
if (NOT PY_KERAS_FOUND)
list(APPEND tmva_veto tmva/TMVA_SOFIE_Keras.C)
list(APPEND tmva_veto tmva/TMVA_SOFIE_Keras_HiggsModel.C)
Expand Down
Loading