Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DamianSzwichtenberg
Copy link
Member

@DamianSzwichtenberg DamianSzwichtenberg commented Sep 23, 2022

Added minimal [segment|grouped]_matmul CPU implementation, using at::matmul_out.

Next steps (other PR):
Optimize code using gemm_batched (preview).

Update:
An additional fix was provided for grouped_matmul which occurred on both CPU and GPU.

C++ exception with description "There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema pyg::grouped_matmul.  This usually means that this function requires a non-empty list of Tensors, or that you (the operator writer) forgot to register a fallback function.

It was caused by the wrong grouped_matmul function signature - it was not aligned with the schema provided at TORCH_LIBRARY_FRAGMENT call. As stated here, Tensor[] as input is equivalent of at::TensorList.

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2022

Codecov Report

Merging #111 (7cadd0a) into master (285bd21) will increase coverage by 5.10%.
The diff coverage is 100.00%.

❗ Current head 7cadd0a differs from pull request most recent head a642ab8. Consider uploading reports for the commit a642ab8 to get more accurate results

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   89.23%   94.33%   +5.10%     
==========================================
  Files          16       19       +3     
  Lines         418      477      +59     
==========================================
+ Hits          373      450      +77     
+ Misses         45       27      -18     
Impacted Files Coverage Δ
pyg_lib/csrc/ops/matmul.h 100.00% <ø> (ø)
pyg_lib/csrc/ops/cpu/matmul_kernel.cpp 100.00% <100.00%> (ø)
pyg_lib/csrc/ops/matmul.cpp 91.83% <100.00%> (+73.65%) ⬆️
pyg_lib/csrc/utils/check.cpp 100.00% <100.00%> (ø)
pyg_lib/csrc/sampler/neighbor.cpp 100.00% <0.00%> (ø)
pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp 89.71% <0.00%> (+0.33%) ⬆️
pyg_lib/csrc/utils/convert.cpp 100.00% <0.00%> (+100.00%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DamianSzwichtenberg
Copy link
Member Author

@rusty1s It seems that docs build is failing because of:

File "/home/docs/checkouts/readthedocs.org/user_builds/pyg-lib/envs/111/lib/python3.8/site-packages/sphinx_rtd_theme/layout.html", line 13, in top-level template code
    {%- set (_ver_major, _ver_minor, _ver_bugfix) = sphinx_version.split('.') | map('int') -%}
ValueError: too many values to unpack (expected 3)

The installed version is now 5.2.0.post0... Maybe we should specify the version explicitly in requirements.txt?

@rusty1s
Copy link
Member

rusty1s commented Sep 25, 2022

Yes, will look into.

@rusty1s
Copy link
Member

rusty1s commented Sep 26, 2022

Seems like sphinx==5.2.1 fixed this issue.

@DamianSzwichtenberg DamianSzwichtenberg force-pushed the minimal-mm-cpu-impl branch 2 times, most recently from a1f7eda to 7cadd0a Compare September 26, 2022 08:31
@DamianSzwichtenberg
Copy link
Member Author

@rusty1s Please take a look. 😉

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 for this PR and the dispatcher fix. I really had no idea how one could resolve it :)

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