Skip to content

Commit

Permalink
CUDA batch matrix multiplication and ops (#23)
Browse files Browse the repository at this point in the history
* update continuous integration

* cublas-based sparse LU solver class

* batched sparse cuda matrix operations

* update cuda installs in ci

* add test to ci

* add missing files

* add missing files

* fix install of torch tools in ci

* add missing new line

* add C++ extensions to gitignore

* clear lingering printf

* license, move tests and utils

* license, move tests

* fix tests in ci

* fix comparisons

* rename util to random_sparse_binary_matrix, rename init_batch_size for clarity

* rename util to random_sparse_binary_matrix

* restore looping idiom, random_sparse_binary_matrix in toplevel __init__

* re-remove from toplevel init

* cols/rows -> num_cols/num_rows

* cols/rows -> num_cols/num_rows

Co-authored-by: Maurizio Monge <[email protected]>
  • Loading branch information
maurimo and Maurizio Monge authored Dec 21, 2021
1 parent ec9546c commit dbb3943
Show file tree
Hide file tree
Showing 4 changed files with 540 additions and 0 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ run_tests: &run_tests
working_directory: ~/project
command: |
pytest -s theseus/tests/test_theseus_layer.py
pytest -s theseus/extlib/tests/test_mat_mult.py
pytest -s theseus/extlib/tests/test_cusolver_lu_solver.py
# -------------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def parse_requirements_file(path):

if "CUDA_HOME" in os.environ:
ext_modules = [
torch_cpp_ext.CUDAExtension(
name="theseus.extlib.mat_mult", sources=["theseus/extlib/mat_mult.cu"]
),
torch_cpp_ext.CUDAExtension(
name="theseus.extlib.cusolver_lu_solver",
sources=[
Expand Down
Loading

0 comments on commit dbb3943

Please sign in to comment.