
# This file was generated by the build system used internally in the Yandex monorepo.
# Only simple modifications are allowed (adding source-files to targets, adding simple properties
# like target_include_directories). These modifications will be ported to original
# ya.make files by maintainers. Any complex modifications which can't be ported back to the
# original buildsystem will not be accepted.


find_package(CUDAToolkit REQUIRED)
add_subdirectory(ut)

add_library(catboost-cuda-ctrs)
target_cuda_sources(catboost-cuda-ctrs PRIVATE
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/kernel/ctr_calcers.cu
)
target_link_libraries(catboost-cuda-ctrs PUBLIC
  contrib-libs-cxxsupp
  yutil
  CUDA::toolkit
  catboost-cuda-cuda_lib
  private-libs-ctr_description
  catboost-cuda-cuda_util
  catboost-libs-helpers
  contrib-libs-gamma_function_apache_math_port
)
target_sources(catboost-cuda-ctrs PRIVATE
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/ctr_bins_builder.cpp
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/ctr_calcers.cpp
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/ctr.cpp
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/prior_estimator.cpp
)
target_cuda_cflags(catboost-cuda-ctrs)
target_cuda_flags(catboost-cuda-ctrs
  -gencode
  arch=compute_35,code=sm_35
  -gencode
  arch=compute_50,code=compute_50
  -gencode
  arch=compute_52,code=sm_52
  -gencode
  arch=compute_60,code=compute_60
  -gencode
  arch=compute_61,code=compute_61
  -gencode
  arch=compute_61,code=sm_61
  -gencode
  arch=compute_70,code=sm_70
  -gencode
  arch=compute_70,code=compute_70
  --ptxas-options=-v
  -gencode=arch=compute_80,code=sm_80
  -gencode=arch=compute_86,code=sm_86
  -gencode=arch=compute_89,code=sm_89
  -gencode=arch=compute_90,code=sm_90
)

add_global_library_for(catboost-cuda-ctrs.global catboost-cuda-ctrs)
target_link_libraries(catboost-cuda-ctrs.global PUBLIC
  contrib-libs-cxxsupp
  yutil
  CUDA::toolkit
  catboost-cuda-cuda_lib
  private-libs-ctr_description
  catboost-cuda-cuda_util
  catboost-libs-helpers
  contrib-libs-gamma_function_apache_math_port
)
target_sources(catboost-cuda-ctrs.global PRIVATE
  ${CMAKE_SOURCE_DIR}/catboost/cuda/ctrs/ctr_kernels.cpp
)
