Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[math] Replace math operators with braintaichi #698

Merged
merged 12 commits into from
Nov 23, 2024
Merged

Conversation

Routhleck
Copy link
Collaborator

@Routhleck Routhleck commented Nov 22, 2024

This pull request introduces support for the braintaichi library in addition to the existing taichi library. It includes changes to dependency checks, updates to the deep neural network (DNN) linear module, and modifications to various test files to accommodate the new library.

Dependency Check Updates:

  • Added import_braintaichi and raise_braintaichi_not_found functions to brainpy/_src/dependency_check.py and updated the minimal version for taichi. [1] [2] [3] [4]

DNN Linear Module Updates:

  • Imported braintaichi and updated the dense_on_post, dense_on_pre, csr_on_pre_update, coo_on_pre_update, coo_on_post_update, and csc_on_post_update functions to use braintaichi.XLACustomOp instead of bm.XLACustomOp if braintaichi is available. [1] [2] [3] [4] [5] [6] [7] [8] [9]

Test File Updates:

  • Removed import_taichi and the corresponding pytest.skip calls from various test files, and updated tests to use jax.numpy as jnp. [1] [2] [3] [4] [5] [6] [7] [8]

Other Changes:

  • Removed the import of tifunc from brainpy/_src/math/__init__.py.
  • Updated csr_matmat.py to use braintaichi and removed unused imports.

@chaoming0625
Copy link
Collaborator

Great work.

@chaoming0625 chaoming0625 merged commit 65baea4 into master Nov 23, 2024
38 checks passed
@chaoming0625 chaoming0625 deleted the braintaichi-op branch November 23, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants