文件历史

12 次代码提交

作者 SHA1 备注 提交日期
Quan (Andy) Gan 3b0c0cec46 enable sparse on windows and mac (#5277)
* enable sparse on windows and mac

* that was stupid

* let's see what's going on..

* [Sparse] Fix the import error on Mac OS.

When using template functions that are defined in source files from DGL,
the loader of MacOS somehow cannot find their definitions. This fix simply
avoids depending on template functions from DGL headers.

With this fix, the sparse tests all pass on the MAC environment.

* ok this is the problem

* make errors clearer

* uh

* test

* Update __init__.py

* disabling ddp on windows

---------

Co-authored-by: czkkkkkk <zekucai@gmail.com>
2023-02-15 16:08:20 +08:00
Quan (Andy) Gan 27010dbc55 [Sparse] Sparse matrix subtraction (#5164)
* use NotImplemented

* format

* sparse sub

* address comments

* lint

* Update elementwise_op_diag.py

* ugh

Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com>
2023-01-16 11:37:42 +08:00
Quan (Andy) Gan acc567aa08 [Sparse] Support sparse matrix dividing scalar (#5173)
* use NotImplemented

* format

* extend to pytorch scalar

* sparse div scalar

* oops

* Apply suggestions from code review

Co-authored-by: Mufei Li <mufeili1996@gmail.com>

Co-authored-by: Mufei Li <mufeili1996@gmail.com>
2023-01-13 22:54:58 +08:00
czkkkkkk b5c5c860f6 [Sparse] Refactor matmul interface. (#5162)
* [Sparse] Refactor matmul interface.

* Update
2023-01-13 20:08:40 +08:00
Hongzhi (Steve), Chen 9334421d2b [Sparse] Rename as_sparse to to_sparse, dense to to_dense. (#5170)
* as_sp_to_sp

* dense

* revert_mock

* test

* revert

Co-authored-by: Steve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
2023-01-13 17:03:20 +08:00
Quan (Andy) Gan 5f5db2dfc7 [Sparse] Make functions compatible with PyTorch scalar tensors (#5163)
* use NotImplemented

* format

* extend to pytorch scalar

* reformat

* reformat

* lint
2023-01-13 14:00:52 +08:00
Quan (Andy) Gan 8abf9d54e3 [Sparse] Use NotImplemented to let Python dispatch types (#5160)
* use NotImplemented

* add TypeError tests

* format

* lint

* fix type

* fix docstring

* lint

* remove redundant condition
2023-01-12 21:12:29 +08:00
czkkkkkk bff32a0986 [Sparse] Use efficient implementation for Diag @ Sparse and Sparse @ Diag. (#5147) 2023-01-12 11:53:46 +08:00
Mufei Li c8bc558880 [Sparse] Remove SparseMatrix.indices and add device/dtype conversions (#5108)
* Update

* Update

* Update

* lint

* lint

* Update

* CI

* Update diag_matrix.py

* Update sparse_matrix.py

* Update sparse_matrix.py

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
Co-authored-by: Hongzhi (Steve), Chen <chenhongzhi.nkcs@gmail.com>
2023-01-06 17:37:13 +08:00
Mufei Li 9169fc3541 [Sparse] Polish sparse matrix creation functions (#5093)
* update

* Update

* Update

* Update

* Update

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2023-01-03 22:59:57 +08:00
czkkkkkk 0698e91a0e [Sparse] Use Pytorch dense computation in SpMM tests (#5096) 2023-01-03 22:26:06 +08:00
Mufei Li 37bd092587 [Sparse] Namespace migration and doc update (#5088)
* update

* lint

* lint

* comments

Co-authored-by: Ubuntu <ubuntu@ip-172-31-36-188.ap-northeast-1.compute.internal>
2022-12-29 20:34:29 +08:00