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

UCM/CUDA: Added support for device-side variables. #10237

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rakhmets
Copy link
Collaborator

What

Added hook for cudaGetSymbolSize to support device-side variables.

src/ucm/cuda/cudamem.c Outdated Show resolved Hide resolved
Comment on lines +239 to +243
/**
* cudaGetSymbolAddress is in ucm_cuda_driver_funcs list because
* hook for cuModuleGetGlobal doesn't intercept cudaGetSymbolAddress call.
* */
UCM_CUDA_FUNC_ENTRY(cudaGetSymbolAddress),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not place it in runtime_api_hooks? we install both driver and runtime hooks anyway..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We install driver and runtime hooks only if UCX_MEM_CUDA_HOOK_MODE=reloc. We install only driver hooks by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make some changes in the hooks logic or array names then? it seems weird that a runtime function is in the "driver" API list

@@ -49,5 +49,6 @@ cudaError_t ucm_cudaMallocFromPoolAsync(void **devPtr, size_t size,
cudaMemPool_t memPool,
cudaStream_t hStream);
#endif
cudaError_t ucm_cudaGetSymbolAddress(void **devPtr, const void *symbol);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move it before ucm_cudaMallocAsync hooks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@yosefe
Copy link
Contributor

yosefe commented Oct 17, 2024

shall we add some unit tests for this?

@yosefe
Copy link
Contributor

yosefe commented Oct 19, 2024

/azp run UCX PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

2 participants