Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Usage of cudaDeviceGetLimit for Retrieving Heap Size in interpreter.cu #39

Open
Shuwei-Song opened this issue Feb 18, 2025 · 1 comment

Comments

@Shuwei-Song
Copy link

Description

Hello 👋,

I am currently studying your code and came across a potential issue in the interpreter.cu file. It appears that the following two lines of code are repeated, both retrieving the stack size instead of one retrieving the heap size:

Location:

  • File: interpreter/interpreter.cu
  • Lines: 32-35
    cudaDeviceGetLimit(&size_value, cudaLimitStackSize);
    printf("current stack size %zu\n", size_value);
    cudaDeviceGetLimit(&size_value, cudaLimitStackSize);
    printf("current heap size %zu\n", size_value);

It seems like the second call to cudaDeviceGetLimit should be retrieving the heap size instead of the stack size. Could you please confirm if this is a mistake?

@minhhn2910
Copy link
Collaborator

Hi @Shuwei-Song, your observation is correct, it is a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants