Maybe there is an error in Samples/3_CUDA_Features/globalToShmemAsyncCopy/globalToShmemAsyncCopy.cu?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 9.6k
- Forks
- 2.4k
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
As you can see, it shoule be reinterpret_cast<float4 *>(&B[b + wB * threadIdx.y + t4x]); obviously in line721.
However, it is reinterpret_cast<float4 *>(&B[a + wA * threadIdx.y + t4x]);
https://github.com/NVIDIA/cuda-samples/blob/e8568c417356f7e66bb9b7130d6be7e55324a519/Samples/3_CUDA_Features/globalToShmemAsyncCopy/globalToShmemAsyncCopy.cu#L225C1-L225C1
When matrixA.width not equal to matrixB.width, the code will be wrong.
Actually, I don't know what happend.
I just a beginner, and want to know more about cuda::memcpy_async.
Who can answer my question, it really confused me!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Samples/3_CUDA_Features/globalToShmemAsyncCopy/globalToShmemAsyncCopy.cu at the reported line and compare the two index expressions used for the reinterpret_cast. Run or inspect the globalToShmemAsyncCopy sample with matrixA.width different from matrixB.width, then determine whether the reported discrepancy affects the result and verify the corrected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100