NVIDIA / NVIDIA/cuda-samples

Impact of setting KERNEl_RADIUS in convolution separable when trying with larger input image size

Open
#191 0 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

Could someone explain to me the impact of kernel_radius value in convolution separable code when working with larger input size (eg: Image Width x Height = 12800 x 12800)? I don't see any variation even when setting the value to KERNEL_RADIUS=8 or setting it to KERNEL_RADIUS=1 in this case.

Here is the output for the above image size with Kernel_radius = 8

Image Width x Height = 12800 x 12800

Allocating and initializing host arrays...
Allocating and initializing CUDA arrays...
Running GPU convolution (16 identical iterations)...

convolutionSeparable, Throughput = 21993.2377 MPixels/sec, **Time = 0.00745 s**, Size = 163840000 Pixels, NumDevsUsed = 1, Workgroup = 0

when kernel_radius = 1

Image Width x Height = 12800 x 12800

Allocating and initializing host arrays...
Allocating and initializing CUDA arrays...
Running GPU convolution (16 identical iterations)...

convolutionSeparable, Throughput = 21968.3556 MPixels/sec, **Time = 0.00746 s**, Size = 163840000 Pixels, NumDevsUsed = 1, Workgroup = 0

Is there any specific reason why it is not getting affected?
Also, it would be great if someone could tell me how to choose the kernel size (or any other parameter which needs to be set apart from it) while performing convolution separable on a larger input size.

Thanks,
Vidya.

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

Start with the convolution separable sample and its KERNEL_RADIUS setting, using the reported 12800x12800 runs as the comparison case. Document the radius/kernel-size relationship and any other parameters needed for larger inputs; done means the sample guidance explains why the radius-1 and radius-8 results differ so little.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.