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

cudaFuncGetAttributes does not work but cuFuncGetAttribute does #21

Open
n-eiling opened this issue Jun 12, 2023 · 1 comment
Open

cudaFuncGetAttributes does not work but cuFuncGetAttribute does #21

n-eiling opened this issue Jun 12, 2023 · 1 comment
Labels
bug Something isn't working regression

Comments

@n-eiling
Copy link
Member

As mentioned in #15

cudaFuncGetAttributes exec fail in server error is cudaErrorInvalidDeviceFunction,if use cuFuncGetAttribute replace is ok

this likely occurs because runtime API functions do not exist on the server side but are translated to driver API cuModule and cuFunction objects. We need to translate these for every runtime API function that references (if any?) modules or functions.

@n-eiling n-eiling added the bug Something isn't working label Jun 12, 2023
@n-eiling n-eiling mentioned this issue Jun 12, 2023
15 tasks
@zaglc
Copy link

zaglc commented Feb 28, 2025

Hi @n-eiling , in your recent commit f251ebaef94b6e66ba1012064d9d898e98794f5b you modify implement of cudaFuncs. In my experiment running stable diffusion in pytorch version, I implement cuda_func_get_attributes_1_svc by enumerating CUfunction_attribute and invoking cuFuncGetAttribute, which indeed works.

Moreover, the cuda kernel (device function?) is stored in rm_functions, whose addr differs between client and server. I think the following code is needed otherwise the server will encounter segmentation fault

void *new_func = resource_mg_get(&rm_functions, (void*)func);

Besides, I'm using cuda 11.8 on A4500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

No branches or pull requests

2 participants