NVIDIA / NVIDIA/cuda-samples

Was that a typo in fp16ScalarProduct?

Open Beginner friendly
#396 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
9.6k
Forks
2.4k
Avg merge
53m
Merged PRs (30d)
1

Description

in line 97& line 121 of Samples/0_Introduction/fp16ScalarProduct/fp16ScalarProduct.cu
for (int i = threadIdx.x + blockDim.x + blockIdx.x; i < size; i += stride)
shouldn't it be int i = threadIdx.x + blockDim.x * blockIdx.x ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open Samples/0_Introduction/fp16ScalarProduct/fp16ScalarProduct.cu and inspect the loops at lines 97 and 121. Compare the index initialization with the surrounding CUDA thread and block calculations, then build or run the fp16ScalarProduct sample to confirm the corrected indexing works. Done means the loops use the intended indexing without changing unrelated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.