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

Autograd for segment_matmul #61

Merged
merged 86 commits into from
Jul 13, 2022
Merged

Autograd for segment_matmul #61

merged 86 commits into from
Jul 13, 2022

Conversation

puririshi98
Copy link
Contributor

No description provided.

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this perfect. A test would be great to ensure correctness.

pyg_lib/csrc/ops/matmul.cpp Show resolved Hide resolved
pyg_lib/csrc/ops/matmul.cpp Show resolved Hide resolved
pyg_lib/csrc/ops/matmul.cpp Outdated Show resolved Hide resolved
pyg_lib/csrc/ops/matmul.cpp Outdated Show resolved Hide resolved
pre-commit-ci bot and others added 18 commits July 12, 2022 20:15
@puririshi98
Copy link
Contributor Author

2: Test command: /home/runner/work/pyg-lib/pyg-lib/build/test_biased_random "--gtest_filter=BiasedSamplingAliasRandomTest.BasicAssertions" "--gtest_also_run_disabled_tests"
2: Test timeout computed to be: 10000000
2: Running main() from /home/runner/work/pyg-lib/pyg-lib/build/_deps/googletest-src/googletest/src/gtest_main.cc
2: Note: Google Test filter = BiasedSamplingAliasRandomTest.BasicAssertions
2: [==========] Running 1 test from 1 test suite.
2: [----------] Global test environment set-up.
2: [----------] 1 test from BiasedSamplingAliasRandomTest
2: [ RUN      ] BiasedSamplingAliasRandomTest.BasicAssertions
2: /home/runner/work/pyg-lib/pyg-lib/test/csrc/random/test_biased_random.cpp:74: Failure
2: Expected: (cnt[1]) < (0.7 * iter), actual: 701 vs 700
2: [  FAILED  ] BiasedSamplingAliasRandomTest.BasicAssertions (1 ms)
2: [----------] 1 test from BiasedSamplingAliasRandomTest (1 ms total)
2: 
2: [----------] Global test environment tear-down
2: [==========] 1 test from 1 test suite ran. (1 ms total)
2: [  PASSED  ] 0 tests.
2: [  FAILED  ] 1 test, listed below:
2: [  FAILED  ] BiasedSamplingAliasRandomTest.BasicAssertions
2: 
2:  1 FAILED TEST

the last CI failure seems unrelated to my changes.

@puririshi98
Copy link
Contributor Author

also unsure how to integrate the python test I wrote as part of this PR into the CI for this project

@rusty1s rusty1s changed the title Draft: autograd group matmul Autograd for segment_matmul Jul 13, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #61 (28d735a) into master (5b48534) will decrease coverage by 6.79%.
The diff coverage is 0.00%.

❗ Current head 28d735a differs from pull request most recent head c0a534f. Consider uploading reports for the commit c0a534f to get more accurate results

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
- Coverage   90.68%   83.89%   -6.80%     
==========================================
  Files          13       13              
  Lines         247      267      +20     
==========================================
  Hits          224      224              
- Misses         23       43      +20     
Impacted Files Coverage Δ
pyg_lib/csrc/ops/matmul.cpp 11.76% <0.00%> (-16.81%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b48534...c0a534f. Read the comment docs.

Copy link
Member

@rusty1s rusty1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @puririshi98. I made some further changes. Also testing autograd on the CPP-level now. I am in favor of merging this but ultimately there is a backward pass missing to compute other_grad. I don't think we can implement this via segment_matmul - it probably needs its own implementation. Let's sync later on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants