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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `metis` partitioning ([#229](https://github.com/pyg-team/pyg-lib/pull/229))
- Enable `hetero_neighbor_samplee` to work in parallel ([#211](https://github.com/pyg-team/pyg-lib/pull/211))
### Changed
- Fixed performance issues reported by Coverity Tool ([#240](https://github.com/pyg-team/pyg-lib/pull/240))
- Updated `cutlass` version for speed boosts in `segment_matmul` and `grouped_matmul` ([#235](https://github.com/pyg-team/pyg-lib/pull/235))
- Drop nested tensor wrapper for `grouped_matmul` implementation ([#226](https://github.com/pyg-team/pyg-lib/pull/226))
- Fixed TorchScript support in `grouped_matmul` ([#220](https://github.com/pyg-team/pyg-lib/pull/220))
Expand Down
8 changes: 4 additions & 4 deletions pyg_lib/csrc/ops/cpu/matmul_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ void grouped_matmul_out_kernel_mkl_impl(const std::vector<at::Tensor> input,
std::vector<scalar_t*> dst;

size_t group_idx = 0;
for (const auto group_kv : groups) {
for (const auto& group_kv : groups) {
int m;
int n;
int k;
std::tie(m, n, k) = group_kv.first;
const auto indices = group_kv.second;
const auto& indices = group_kv.second;

ms[group_idx] = m;
ns[group_idx] = n;
Expand Down Expand Up @@ -369,9 +369,9 @@ void segment_matmul_out_kernel_mkl_impl(const at::Tensor& input,
const auto dst_base_ptr = out.data_ptr<scalar_t>();

size_t group_idx = 0;
for (const auto group_kv : groups) {
for (const auto& group_kv : groups) {
int m = group_kv.first;
const auto indices = group_kv.second;
const auto& indices = group_kv.second;

ms[group_idx] = m;
group_sizes[group_idx] = indices.size();
Expand Down