Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8240919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:39:31+00:00 2026-06-07T20:39:31+00:00

I am trying to solve this problem myself but I can’t. So I want

  • 0

I am trying to solve this problem myself but I can’t.
So I want to get yours advice.

I am writing kernel code like this. VGA is GTX 580.

xxxx <<< blockNum, threadNum, SharedSize >>> (... threadNum ...)
(note. SharedSize is set 2*threadNum)

__global__ void xxxx(..., int threadNum, ...)
{
    extern __shared__ int shared[];
    int* sub_arr = &shared[0];
    int* sub_numCounting = &shared[threadNum];
    ...
}

My program creates about 1085 blocks and 1024 threads per block (I am trying to handle a huge array).

So the size of shared memory per block is 8192 (1024*2*4) bytes, right?

I figured out that I can use maximum 49152 bytes in shared memory per block on GTX 580 by using cudaDeviceProp.

And I know that the GTX 580 has 16 processors, thread block can be implemented on processor.

But my program returns an error (8192 bytes < 49152 bytes).

I used printf in the kernel to see whether it operates well or not but several blocks do not operate: Even though I create 1085 blocks, actually only 50~100 blocks operate.

And I want to know whether blocks which operate on the same processor share the same shared memory address or not. If not, do they allocate other memory for shared memory?

I can’t quite understand what maximum size of shared memory per block means.

Give me advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:39:33+00:00Added an answer on June 7, 2026 at 8:39 pm

    Yes, blocks on the same multiprocessor shared the same amount of shared memory, which is 48KB per multiprocessor for your GPU card (compute capability 2.0). So if you have N blocks on the same multiprocessor, the maximum size of shared memory per block is (48/N) KB.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to solve this problem for a number of days now but
I'm trying to solve this problem, its not a homework question, its just code
I have been trying to solve this problem for a while, but couldn't with
I've been trying to solve this problem for a while now and I can't
I am trying to solve this exponentiation problem . Here is the code that
Trying to solve this problem . I would like to learn how the bootstrapper
I am trying to solve this problem. I have a series of SELECT statements
I'm trying to solve this problem : http://uva.onlinejudge.org/external/7/732.html . For the given example, they
I've been trying to solve this problem for hours now and i cannot figure
I'm trying to solve this problem for a long time. I have 2 forms,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.