Skip to content

Commit

Permalink
Merge branch 'master' into python-3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Jan 3, 2025
2 parents a797f91 + 799199a commit 612e99c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1,165 deletions.
4 changes: 4 additions & 0 deletions .ci/conda-envs/ci-core-py38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ pytest=8.2.*
# pinned here to help speed up solves
bokeh=3.1.*
fsspec=2024.5.*
# pinning 'libabseil' and 'libre2' to specific build numbers for pyarrow compatibility:
# ref: https://github.com/microsoft/LightGBM/issues/6772
libabseil=20240722.0=*_1
libre2-11=2024.07.02=*_1
msgpack-python=1.0.*
pluggy=1.5.*
pyparsing=3.1.4
Expand Down
56 changes: 0 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,54 +252,6 @@ if(USE_CUDA)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
endif()

set(
BASE_DEFINES
-DPOWER_FEATURE_WORKGROUPS=12
-DUSE_CONSTANT_BUF=0
)
set(
ALLFEATS_DEFINES
${BASE_DEFINES}
-DENABLE_ALL_FEATURES
)
set(
FULLDATA_DEFINES
${ALLFEATS_DEFINES}
-DIGNORE_INDICES
)

message(STATUS "ALLFEATS_DEFINES: ${ALLFEATS_DEFINES}")
message(STATUS "FULLDATA_DEFINES: ${FULLDATA_DEFINES}")

function(add_histogram hsize hname hadd hconst hdir)
add_library(histo${hsize}${hname} OBJECT src/treelearner/kernels/histogram${hsize}.cu)
set_target_properties(
histo${hsize}${hname}
PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
CUDA_ARCHITECTURES ${CUDA_ARCHS}
)
if(hadd)
list(APPEND histograms histo${hsize}${hname})
set(histograms ${histograms} PARENT_SCOPE)
endif()
target_compile_definitions(
histo${hsize}${hname}
PRIVATE
-DCONST_HESSIAN=${hconst}
${hdir}
)
endfunction()

foreach(hsize _16_64_256)
add_histogram("${hsize}" "_sp_const" "True" "1" "${BASE_DEFINES}")
add_histogram("${hsize}" "_sp" "True" "0" "${BASE_DEFINES}")
add_histogram("${hsize}" "-allfeats_sp_const" "False" "1" "${ALLFEATS_DEFINES}")
add_histogram("${hsize}" "-allfeats_sp" "False" "0" "${ALLFEATS_DEFINES}")
add_histogram("${hsize}" "-fulldata_sp_const" "True" "1" "${FULLDATA_DEFINES}")
add_histogram("${hsize}" "-fulldata_sp" "True" "0" "${FULLDATA_DEFINES}")
endforeach()
endif()

include(CheckCXXSourceCompiles)
Expand Down Expand Up @@ -634,14 +586,6 @@ if(USE_CUDA)
CUDA_RESOLVE_DEVICE_SYMBOLS ON
)
endif()

# histograms are list of object libraries. Linking object library to other
# object libraries only gets usage requirements, the linked objects won't be
# used. Thus we have to call target_link_libraries on final targets here.
if(BUILD_CLI)
target_link_libraries(lightgbm PRIVATE ${histograms})
endif()
target_link_libraries(_lightgbm PRIVATE ${histograms})
endif()

if(WIN32)
Expand Down
Loading

0 comments on commit 612e99c

Please sign in to comment.