gbrl-gpu 1.0.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. gbrl-gpu-1.0.12/CMakeLists.txt +274 -0
  2. gbrl-gpu-1.0.12/LICENSE +38 -0
  3. gbrl-gpu-1.0.12/LICENSES.txt +916 -0
  4. gbrl-gpu-1.0.12/MANIFEST.in +11 -0
  5. gbrl-gpu-1.0.12/PKG-INFO +14 -0
  6. gbrl-gpu-1.0.12/README.md +85 -0
  7. gbrl-gpu-1.0.12/gbrl/__init__.py +70 -0
  8. gbrl-gpu-1.0.12/gbrl/ac_gbrl.py +792 -0
  9. gbrl-gpu-1.0.12/gbrl/config.py +11 -0
  10. gbrl-gpu-1.0.12/gbrl/gbrl_wrapper.py +598 -0
  11. gbrl-gpu-1.0.12/gbrl/gbt.py +361 -0
  12. gbrl-gpu-1.0.12/gbrl/include/dlpack/dlpack.h +332 -0
  13. gbrl-gpu-1.0.12/gbrl/src/cpp/CMakeLists.txt +93 -0
  14. gbrl-gpu-1.0.12/gbrl/src/cpp/binding.cpp +621 -0
  15. gbrl-gpu-1.0.12/gbrl/src/cpp/config.h +16 -0
  16. gbrl-gpu-1.0.12/gbrl/src/cpp/data_structs.cpp +63 -0
  17. gbrl-gpu-1.0.12/gbrl/src/cpp/data_structs.h +28 -0
  18. gbrl-gpu-1.0.12/gbrl/src/cpp/fitter.cpp +591 -0
  19. gbrl-gpu-1.0.12/gbrl/src/cpp/fitter.h +31 -0
  20. gbrl-gpu-1.0.12/gbrl/src/cpp/gbrl.cpp +1138 -0
  21. gbrl-gpu-1.0.12/gbrl/src/cpp/gbrl.h +88 -0
  22. gbrl-gpu-1.0.12/gbrl/src/cpp/loss.cpp +73 -0
  23. gbrl-gpu-1.0.12/gbrl/src/cpp/loss.h +21 -0
  24. gbrl-gpu-1.0.12/gbrl/src/cpp/math_ops.cpp +745 -0
  25. gbrl-gpu-1.0.12/gbrl/src/cpp/math_ops.h +113 -0
  26. gbrl-gpu-1.0.12/gbrl/src/cpp/node.cpp +555 -0
  27. gbrl-gpu-1.0.12/gbrl/src/cpp/node.h +53 -0
  28. gbrl-gpu-1.0.12/gbrl/src/cpp/optimizer.cpp +305 -0
  29. gbrl-gpu-1.0.12/gbrl/src/cpp/optimizer.h +78 -0
  30. gbrl-gpu-1.0.12/gbrl/src/cpp/predictor.cpp +248 -0
  31. gbrl-gpu-1.0.12/gbrl/src/cpp/predictor.h +24 -0
  32. gbrl-gpu-1.0.12/gbrl/src/cpp/scheduler.cpp +114 -0
  33. gbrl-gpu-1.0.12/gbrl/src/cpp/scheduler.h +67 -0
  34. gbrl-gpu-1.0.12/gbrl/src/cpp/shap.cpp +346 -0
  35. gbrl-gpu-1.0.12/gbrl/src/cpp/shap.h +42 -0
  36. gbrl-gpu-1.0.12/gbrl/src/cpp/split_candidate_generator.cpp +315 -0
  37. gbrl-gpu-1.0.12/gbrl/src/cpp/split_candidate_generator.h +46 -0
  38. gbrl-gpu-1.0.12/gbrl/src/cpp/types.cpp +693 -0
  39. gbrl-gpu-1.0.12/gbrl/src/cpp/types.h +199 -0
  40. gbrl-gpu-1.0.12/gbrl/src/cpp/utils.cpp +95 -0
  41. gbrl-gpu-1.0.12/gbrl/src/cpp/utils.h +71 -0
  42. gbrl-gpu-1.0.12/gbrl/src/cuda/CMakeLists.txt +38 -0
  43. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_fitter.cu +1247 -0
  44. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_fitter.h +64 -0
  45. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_loss.cu +68 -0
  46. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_loss.h +29 -0
  47. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_predictor.cu +490 -0
  48. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_predictor.h +40 -0
  49. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_preprocess.cu +429 -0
  50. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_preprocess.h +41 -0
  51. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_types.cu +368 -0
  52. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_types.h +96 -0
  53. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_utils.cu +33 -0
  54. gbrl-gpu-1.0.12/gbrl/src/cuda/cuda_utils.h +24 -0
  55. gbrl-gpu-1.0.12/gbrl/utils.py +330 -0
  56. gbrl-gpu-1.0.12/gbrl_gpu.egg-info/PKG-INFO +14 -0
  57. gbrl-gpu-1.0.12/gbrl_gpu.egg-info/SOURCES.txt +62 -0
  58. gbrl-gpu-1.0.12/gbrl_gpu.egg-info/dependency_links.txt +1 -0
  59. gbrl-gpu-1.0.12/gbrl_gpu.egg-info/top_level.txt +2 -0
  60. gbrl-gpu-1.0.12/pyproject.toml +71 -0
  61. gbrl-gpu-1.0.12/setup.cfg +4 -0
  62. gbrl-gpu-1.0.12/setup.py +123 -0
  63. gbrl-gpu-1.0.12/tests/test_gbt_multi.py +525 -0
  64. gbrl-gpu-1.0.12/tests/test_gbt_single.py +543 -0
@@ -0,0 +1,274 @@
1
+ ##############################################################################
2
+ # Copyright (c) 2024, NVIDIA Corporation. All rights reserved.
3
+ #
4
+ # This work is made available under the Nvidia Source Code License-NC.
5
+ # To view a copy of this license, visit
6
+ # https://nvlabs.github.io/gbrl/license.html
7
+ #
8
+ ##############################################################################
9
+ cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
10
+ # Set project details
11
+ project(gbrl LANGUAGES C CXX VERSION 1.0.0)
12
+ # Set C++14
13
+ set(CMAKE_CXX_STANDARD 14)
14
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
15
+ # Default to release build type
16
+ if (NOT CMAKE_BUILD_TYPE)
17
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
18
+ endif()
19
+
20
+ if (POLICY CMP0148)
21
+ cmake_policy(SET CMP0148 NEW)
22
+ endif()
23
+
24
+ if (MSVC)
25
+ if(MSVC_VERSION LESS 1910)
26
+ message(
27
+ FATAL_ERROR
28
+ "The compiler ${CMAKE_CXX_COMPILER} doesn't support required C++14 features. Please use a newer MSVC."
29
+ )
30
+ endif()
31
+ endif()
32
+
33
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
34
+ add_definitions(-DDEBUG)
35
+ endif()
36
+
37
+ # Allow overriding Python paths
38
+ if (DEFINED PYTHON_EXECUTABLE)
39
+ set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Path to the Python executable")
40
+ endif()
41
+
42
+ if (DEFINED PYTHON_INCLUDE_DIR)
43
+ set(Python3_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} CACHE FILEPATH "Path to the Python include directory")
44
+ endif()
45
+
46
+ if (DEFINED PYTHON_LIBRARY)
47
+ set(Python3_LIBRARY ${PYTHON_LIBRARY} CACHE FILEPATH "Path to the Python library")
48
+ endif()
49
+
50
+ # Find Python 3
51
+ find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED)
52
+
53
+ #-- Options
54
+ include(CMakeDependentOption)
55
+ option(USE_CUDA "Build with GPU acceleration" OFF)
56
+ option(COVERAGE "Run coverage report" OFF)
57
+ option(ASAN "Use address-santizier" OFF)
58
+
59
+ if(COVERAGE)
60
+ message(STATUS "Coverage build")
61
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
62
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
63
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
64
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
65
+ endif()
66
+
67
+ # Check for CUDA availability
68
+ if (USE_CUDA AND NOT APPLE)
69
+ find_package(CUDAToolkit QUIET HINTS $ENV{CONDA_PREFIX})
70
+ # 2. Fallback to system-wide CUDA if not found in Anaconda
71
+ if (NOT CUDAToolkit_FOUND)
72
+ find_package(CUDAToolkit QUIET)
73
+ endif()
74
+ if (CUDAToolkit_FOUND)
75
+ set(CUDA_VERSION "${CUDAToolkit_VERSION_MAJOR}${CUDAToolkit_VERSION_MINOR}")
76
+ # Ensure CUDA architectures are set before enabling CUDA language
77
+ set(CUDA_ARCHS "60" "61" "62" "70" "75")
78
+
79
+ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "110")
80
+ list(APPEND CUDA_ARCHS "80")
81
+ endif()
82
+ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "111")
83
+ list(APPEND CUDA_ARCHS "86")
84
+ endif()
85
+ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "115")
86
+ list(APPEND CUDA_ARCHS "87")
87
+ endif()
88
+ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "118")
89
+ list(APPEND CUDA_ARCHS "89")
90
+ list(APPEND CUDA_ARCHS "90")
91
+ endif()
92
+ list(POP_BACK CUDA_ARCHS CUDA_LAST_SUPPORTED_ARCH)
93
+ list(APPEND CUDA_ARCHS "${CUDA_LAST_SUPPORTED_ARCH}-virtual")
94
+ set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCHS})
95
+
96
+ if(NOT DEFINED CMAKE_CUDA_HOST_COMPILER AND NOT DEFINED ENV{CUDAHOSTCXX})
97
+ set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE FILEPATH
98
+ "The compiler executable to use when compiling host code for CUDA")
99
+ mark_as_advanced(CMAKE_CUDA_HOST_COMPILER)
100
+ message(STATUS "Configured CUDA host compiler: ${CMAKE_CUDA_HOST_COMPILER}")
101
+ endif()
102
+ if(NOT DEFINED CMAKE_CUDA_COMPILER)
103
+ if(DEFINED ENV{CUDACXX})
104
+ set(CMAKE_CUDA_COMPILER $ENV{CUDACXX} CACHE FILEPATH "CUDA Compiler")
105
+ message(STATUS "CMAKE_CUDA_COMPILER set to $ENV{CUDACXX} from environment.")
106
+ else()
107
+ message(STATUS "Setting CMAKE_CUDA_COMPILER to ${CUDAToolkit_NVCC_EXECUTABLE}")
108
+ set(CMAKE_CUDA_COMPILER "${CUDAToolkit_NVCC_EXECUTABLE}")
109
+ endif()
110
+ else()
111
+ message(STATUS "CMAKE_CUDA_COMPILER=${CMAKE_CUDA_COMPILER}")
112
+ endif()
113
+ # Validate the compiler before enabling CUDA
114
+ if (NOT EXISTS ${CMAKE_CUDA_COMPILER})
115
+ message(WARNING "CUDA toolkit found, but could not locate nvcc at ${CMAKE_CUDA_COMPILER}. Disabling GPU acceleration.")
116
+ set(USE_CUDA OFF)
117
+ endif()
118
+ if (USE_CUDA)
119
+ enable_language(CUDA)
120
+ if(${CUDA_VERSION} VERSION_LESS 11.0)
121
+ message(FATAL_ERROR "CUDA version must be at least 11.0!")
122
+ endif()
123
+ if(DEFINED GPU_COMPUTE_VER)
124
+ compute_cmake_cuda_archs("${GPU_COMPUTE_VER}")
125
+ endif()
126
+ endif()
127
+ else()
128
+ message(STATUS "CUDA not found, compiling for CPU only")
129
+ set(USE_CUDA OFF)
130
+ endif()
131
+ endif()
132
+
133
+ if(NOT USE_CUDA)
134
+ message(STATUS "Compiling for CPU only")
135
+ else()
136
+ message(STATUS "NVCC ${CUDAToolkit_VERSION} found, compiling for CPU and GPU")
137
+ endif()
138
+ # Find required packages
139
+ # Attempt to find pybind11 automatically with Anaconda
140
+ find_package(pybind11 CONFIG QUIET HINTS $ENV{CONDA_PREFIX})
141
+ # 2. Fallback to system-wide CUDA if not found in Anaconda
142
+ if (NOT pybind11)
143
+ find_package(pybind11 CONFIG QUIET)
144
+ endif()
145
+ # If pybind11 is not found, use Python to find it
146
+ if(NOT pybind11_FOUND)
147
+ message(STATUS "pybind11 not found automatically, attempting to locate with Python")
148
+ execute_process(
149
+ COMMAND ${Python3_EXECUTABLE} -c "import pybind11; print(pybind11.get_cmake_dir())"
150
+ OUTPUT_VARIABLE pybind11_DIR
151
+ OUTPUT_STRIP_TRAILING_WHITESPACE
152
+ )
153
+ if(NOT EXISTS ${pybind11_DIR})
154
+ message(FATAL_ERROR "pybind11 not found, please install it using 'pip install pybind11'")
155
+ endif()
156
+ list(APPEND CMAKE_PREFIX_PATH ${pybind11_DIR})
157
+ find_package(pybind11 CONFIG REQUIRED)
158
+ endif()
159
+
160
+ find_path(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/cgraph.h
161
+ HINTS ${GRAPHVIZ_INCLUDE_DIR})
162
+ find_library(GRAPHVIZ_GVC_LIBRARY NAMES gvc
163
+ HINTS ${GRAPHVIZ_LIBRARY_DIR})
164
+ find_library(GRAPHVIZ_CGRAPH_LIBRARY NAMES cgraph
165
+ HINTS ${GRAPHVIZ_LIBRARY_DIR})
166
+
167
+ if(GRAPHVIZ_INCLUDE_DIR AND GRAPHVIZ_GVC_LIBRARY AND GRAPHVIZ_CGRAPH_LIBRARY)
168
+ set(GRAPHVIZ_FOUND TRUE)
169
+ else()
170
+ set(GRAPHVIZ_FOUND FALSE)
171
+ endif()
172
+ set(GRAPHVIZ_FOUND FALSE)
173
+
174
+
175
+ if(APPLE)
176
+ find_package(OpenMP)
177
+ if(NOT OpenMP_FOUND)
178
+ # Try again with extra path info; required for libomp 15+ from Homebrew
179
+ execute_process(COMMAND brew --prefix libomp
180
+ OUTPUT_VARIABLE HOMEBREW_LIBOMP_PREFIX
181
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
182
+ set(OpenMP_C_FLAGS
183
+ "-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
184
+ set(OpenMP_CXX_FLAGS
185
+ "-Xpreprocessor -fopenmp -I${HOMEBREW_LIBOMP_PREFIX}/include")
186
+ set(OpenMP_C_LIB_NAMES omp)
187
+ set(OpenMP_CXX_LIB_NAMES omp)
188
+ set(OpenMP_omp_LIBRARY ${HOMEBREW_LIBOMP_PREFIX}/lib/libomp.dylib)
189
+ find_package(OpenMP REQUIRED)
190
+ endif()
191
+ else()
192
+ if (MSVC)
193
+ find_package(OpenMP REQUIRED COMPONENTS C CXX)
194
+ else()
195
+ find_package(OpenMP REQUIRED)
196
+ endif()
197
+ set(OpenMP_CXX_FLAGS ${OpenMP_CXX_FLAGS})
198
+ set(OpenMP_CXX_LIB_NAMES ${OpenMP_CXX_LIB_NAMES})
199
+ set(OpenMP_omp_LIBRARY ${OpenMP_omp_LIBRARY})
200
+ endif()
201
+
202
+ # Ensure OpenMP flags and directories are applied
203
+ if (OpenMP_FOUND)
204
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
205
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
206
+ if (MSVC)
207
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /openmp:experimental")
208
+ else()
209
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
210
+ endif()
211
+ endif()
212
+
213
+ # Add subdirectories for cpp and cuda
214
+ add_subdirectory(gbrl/src/cpp)
215
+
216
+ if (USE_CUDA AND NOT APPLE)
217
+ set(CMAKE_CUDA_STANDARD 14)
218
+ include_directories(${CUDAToolkit_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/gbrl/src/cuda)
219
+ add_definitions(-DUSE_CUDA)
220
+ add_subdirectory(gbrl/src/cuda)
221
+ set(CUDA_SOURCES $<TARGET_OBJECTS:cuda_gbrl_src>)
222
+
223
+ else()
224
+ set(CUDA_SOURCES "")
225
+ endif()
226
+
227
+ # Only include pybind11 in the binding file
228
+ set(PYBIND_SOURCES
229
+ gbrl/src/cpp/binding.cpp
230
+ )
231
+
232
+ pybind11_add_module(gbrl_cpp MODULE ${PYBIND_SOURCES})
233
+ target_include_directories(gbrl_cpp PRIVATE ${Python3_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/gbrl/src/cpp ${CMAKE_SOURCE_DIR}/gbrl/include/)
234
+ target_compile_definitions(gbrl_cpp PRIVATE MODULE_NAME="gbrl_cpp")
235
+ target_link_libraries(gbrl_cpp PRIVATE gbrl_cpp_src)
236
+
237
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
238
+ target_link_libraries(gbrl_cpp PRIVATE ${DEBUG_LINK_FLAGS})
239
+ endif()
240
+
241
+
242
+ if (USE_CUDA)
243
+ target_link_libraries(gbrl_cpp PRIVATE cuda_gbrl_src)
244
+ endif()
245
+ # Platform-specific settings and linking
246
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
247
+ target_link_libraries(gbrl_cpp PRIVATE OpenMP::OpenMP_CXX)
248
+ if (USE_CUDA)
249
+ target_link_libraries(gbrl_cpp PRIVATE CUDA::cudart)
250
+ endif()
251
+ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
252
+ find_package(LLVM REQUIRED)
253
+ include_directories(${LLVM_INCLUDE_DIRS})
254
+ link_directories(${LLVM_LIBRARY_DIRS})
255
+ target_link_libraries(gbrl_cpp PRIVATE ${LLVM_LIBRARIES} OpenMP::OpenMP_CXX)
256
+ elseif (WIN32)
257
+ target_link_libraries(gbrl_cpp PRIVATE OpenMP::OpenMP_CXX)
258
+ if (USE_CUDA)
259
+ set(cuda_lib_path "${CUDAToolkit_ROOT_DIR}/lib/x64")
260
+ message(STATUS "cuda_lib_path: ${cuda_lib_path}")
261
+ target_link_libraries(gbrl_cpp PRIVATE CUDA::cudart)
262
+ endif()
263
+ endif()
264
+
265
+ # Link Graphviz libraries if available
266
+ if (GRAPHVIZ_FOUND)
267
+ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
268
+ target_link_libraries(gbrl_cpp PRIVATE ${GRAPHVIZ_GVC_LIBRARY} ${GRAPHVIZ_CGRAPH_LIBRARY})
269
+ elseif (WIN32)
270
+ find_library(GRAPHVIZ_CDT_LIBRARY NAMES cdt
271
+ HINTS ${GRAPHVIZ_LIBRARY_DIR})
272
+ target_link_libraries(gbrl_cpp PRIVATE ${GRAPHVIZ_GVC_LIBRARY} ${GRAPHVIZ_CGRAPH_LIBRARY} ${GRAPHVIZ_CDT_LIBRARY})
273
+ endif()
274
+ endif()
@@ -0,0 +1,38 @@
1
+ Copyright (c) 2024, NVIDIA Corporation. All rights reserved.
2
+
3
+
4
+ Nvidia Source Code License-NC
5
+ 1. Definitions
6
+
7
+ “Licensor” means any person or entity that distributes its Work.
8
+ “Work” means (a) the original work of authorship made available under this license, which may include software, documentation, or other files, and (b) any additions to or derivative works thereof that are made available under this license.
9
+ The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this license, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work.
10
+ Works are “made available” under this license by including in or with the Work either (a) a copyright notice referencing the applicability of this license to the Work, or (b) a copy of this license.
11
+
12
+ 2. License Grant
13
+
14
+ 2.1 Copyright Grant. Subject to the terms and conditions of this license, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form.
15
+
16
+ 3. Limitations
17
+
18
+ 3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this license, (b) you include a complete copy of this license with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work.
19
+
20
+ 3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this license (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself.
21
+
22
+ 3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use non-commercially. Notwithstanding the foregoing, NVIDIA Corporation and its affiliates may use the Work and any derivative works commercially. As used herein, “non-commercially” means for research or evaluation purposes only.
23
+
24
+ 3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this license from such Licensor (including the grant in Section 2.1) will terminate immediately.
25
+
26
+ 3.5 Trademarks. This license does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this license.
27
+
28
+ 3.6 Termination. If you violate any term of this license, then your rights under this license (including the grant in Section 2.1) will terminate immediately.
29
+
30
+ 4. Disclaimer of Warranty.
31
+
32
+ THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
33
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.
34
+
35
+ 5. Limitation of Liability.
36
+
37
+ EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
38
+