Skip to content

Commit cafdf13

Browse files
authored
Merge pull request #2 from JetBrains-Research/master
[Pull] Pulling changes from main repository
2 parents 26cda4e + 2803f49 commit cafdf13

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1405
-405
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
/build
77

88
# Python cache
9-
/python/pycubool/__pycache__/
9+
/**/__pycache__/

CMakeLists.txt

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
# CuBool library Cmake config file
22
# Add this file as sub-directory to your project to use library functionality
3-
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)
3+
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
44
project(CUBOOL LANGUAGES CXX CUDA)
55

66
# Exposed to the user build options
7-
option(CUBOOL_DEBUG "Build library in debug mode" ON)
8-
option(CUBOOL_RELEASE "Build library in release mode" OFF)
97
option(CUBOOL_WITH_CUB "Build project with locally stored CUB library" ON)
108
option(CUBOOL_WITH_NSPARSE "Build library with nsparse crs matrix multiplication backend" ON)
119
option(CUBOOL_WITH_NAIVE "Build library with naive and naive-shared dense matrix multiplication" ON)
1210
option(CUBOOL_BUILD_TESTS "Build project unit-tests with gtest" ON)
1311

14-
SET(CUBOOL_WITH_CUB ON CACHE BOOL "" FORCE)
15-
SET(CUBOOL_WITH_NSPARSE ON CACHE BOOL "" FORCE)
16-
SET(CUBOOL_WITH_NAIVE ON CACHE BOOL "" FORCE)
17-
SET(CUBOOL_BUILD_TESTS ON CACHE BOOL "" FORCE)
18-
19-
# Library version setup
20-
set(CUBOOL_VERSION_MAJOR 0)
21-
set(CUBOOL_VERSION_MINOR 1)
22-
23-
configure_file(
24-
${CMAKE_CURRENT_LIST_DIR}/src/cubool/build.hpp.in
25-
${CMAKE_BINARY_DIR}/src/cubool/build.hpp)
12+
set(CUBOOL_VERSION_MAJOR 1)
13+
set(CUBOOL_VERSION_MINOR 0)
2614

2715
# Configure dependencies
2816
if (CUBOOL_WITH_CUB)
@@ -37,7 +25,6 @@ endif()
3725

3826
if (CUBOOL_WITH_NSPARSE)
3927
message(STATUS "Add nsparse library as crs matrix multiplication backend")
40-
add_subdirectory(thirdparty/nsparse)
4128
add_subdirectory(thirdparty/nsparse-um)
4229
endif()
4330

@@ -65,12 +52,18 @@ set(CUBOOL_SOURCES
6552
src/cubool/matrix_base.hpp
6653
src/cubool/matrix_dense.cu
6754
src/cubool/matrix_dense.hpp
68-
src/cubool/matrix_csr.cu
6955
src/cubool/matrix_csr.hpp
56+
src/cubool/matrix_csr.cu
57+
src/cubool/matrix_csr_multiply_sum.cu
58+
src/cubool/matrix_csr_multiply_add.cu
59+
src/cubool/matrix_csr_ewise_add.cu
60+
src/cubool/matrix_csr_kron.cu
61+
src/cubool/matrix_csr_transpose.cu
7062
src/cubool/kernels/matrix_dense_multiply_add.cuh
7163
src/cubool/kernels/matrix_dense_common.cuh
7264
src/cubool/kernels/matrix_csr_spkron.cuh
7365
src/cubool/kernels/matrix_csr_spmerge.cuh
66+
src/cubool/kernels/matrix_csr_sptranspose.cuh
7467
src/cubool/details/error.hpp
7568
src/cubool/details/device_allocator.cuh
7669
src/cubool/details/host_allocator.hpp
@@ -81,7 +74,9 @@ add_library(cubool SHARED ${CUBOOL_SOURCES})
8174

8275
target_include_directories(cubool PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
8376
target_include_directories(cubool PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
84-
target_include_directories(cubool PRIVATE ${CMAKE_BINARY_DIR}/src)
77+
78+
target_compile_definitions(cubool PRIVATE CUBOOL_VERSION_MAJOR=${CUBOOL_VERSION_MAJOR})
79+
target_compile_definitions(cubool PRIVATE CUBOOL_VERSION_MINOR=${CUBOOL_VERSION_MINOR})
8580

8681
target_link_libraries(cubool PRIVATE nsparse_um)
8782
target_compile_features(cubool PUBLIC cxx_std_14)
@@ -106,7 +101,9 @@ add_library(cubool_dummy SHARED ${CUBOOL_DUMMY_SOURCES})
106101

107102
target_include_directories(cubool_dummy PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
108103
target_include_directories(cubool_dummy PRIVATE ${CMAKE_CURRENT_LIST_DIR}/src)
109-
target_include_directories(cubool_dummy PRIVATE ${CMAKE_BINARY_DIR}/src)
104+
105+
target_compile_definitions(cubool_dummy PRIVATE CUBOOL_VERSION_MAJOR=${CUBOOL_VERSION_MAJOR})
106+
target_compile_definitions(cubool_dummy PRIVATE CUBOOL_VERSION_MINOR=${CUBOOL_VERSION_MINOR})
110107

111108
target_compile_features(cubool_dummy PUBLIC cxx_std_11)
112109

@@ -116,4 +113,10 @@ set_target_properties(cubool_dummy PROPERTIES CXX_STANDARD_REQUIRED ON)
116113
# If tests enabled, add tests sources to the build
117114
if (CUBOOL_BUILD_TESTS)
118115
add_subdirectory(tests)
119-
endif()
116+
endif()
117+
118+
# Copy scripts into binary directory
119+
file(COPY scripts DESTINATION ${CMAKE_BINARY_DIR}/)
120+
121+
# Copy python related stuff
122+
file(COPY python DESTINATION ${CMAKE_BINARY_DIR}/)

CODE_OF_CONDUCT.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# JetBrains Open Source and Community Code of Conduct
2+
3+
This code of conduct outlines our expectations for all those who participate in our
4+
open source projects and communities (community programs), as well as the consequences
5+
for unacceptable behaviour. We invite all those who participate to help us create safe
6+
and positive experiences for everyone. Communities mirror the societies in which they
7+
exist and positive action is essential to counteract the many forms of inequality and
8+
abuses of power that exist in society.
9+
10+
## How to behave
11+
12+
The following behaviours are expected and requested of all community members:
13+
14+
- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
15+
- Exercise consideration, respect and empathy in your speech and actions. Remember, we have all been through different stages of learning when adopting technologies.
16+
- Refrain from demeaning, discriminatory, or harassing behaviour and speech.
17+
- Disagreements on things are fine, argumentative behaviour or trolling are not.
18+
19+
## How not to behave
20+
21+
- Do not perform threats of violence or use violent language directed against another person.
22+
- Do not make jokes of sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory nature, or use language of this nature.
23+
- Do not post or display sexually explicit or violent material.
24+
- Do not post or threaten to post other people’s personally identifying information ("doxing").
25+
- Do not make personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
26+
- Do not engage in sexual attention. This includes, sexualised comments or jokes and sexual advances.
27+
- Do not advocate for, or encourage, any of the above behaviour.
28+
29+
30+
Please take into account that online communities bring together people from many
31+
different cultures and backgrounds. It's important to understand that sometimes
32+
the combination of cultural differences and online interaction can lead to misunderstandings.
33+
That is why having empathy is very important.
34+
35+
## Also
36+
37+
You can access original text at
38+
[JetBrains Open Source and Community Code of Conduct](https://confluence.jetbrains.com/display/ALL/JetBrains+Open+Source+and+Community+Code+of+Conduct).

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright (c) 2020 JetBrains-Research
44

0 commit comments

Comments
 (0)