You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to set a virtual address range as read-only, by using the cuMemSetAccess function.
In this example, I am trying to set the page containing the function as read-only, but the call to cuMemSetAccess fails with the error: "invalid argument".
I think I am using the right addresses, in terms of alignment and size. I've verified the correctness of it by dumping the PTEs of the device.
I'm not sure whether this problem is about using these functions in NVBIT or if I'm doing something wrong, thus I am not sure this is the right place to seek for help.
The text was updated successfully, but these errors were encountered:
I ran into a similar issue previously. I believe that earlier versions of cuda toolkit do not support the read only flag. I forget which revision of cuda 12 was this fixed in.
What version of cuda are you running on? Did you try setting memory allocated from cumemcreate to be read only?
Hello,
I'm currently using CUDA 12.6 on an NVIDIA RTX A500 Laptop GPU (Ampere).
I tried setting the memory allocated from cuMemCreate to be read-only, which works.
It could be because I don't have access to the physical memory handle in that context. I mean the cuMemSetAccess does not require that, but by looking at the interactions between the runtime and the kernel driver it seems like the cuMemSetAccess operation consists in:
Freeing the (virtual) memory
Re-allocating the virtual memory address range
Mapping the old physical memory to the new virtual address range, by setting the updated access flags.
Step 3. requires the physical memory handle.
Or maybe, more simply, I'm not computing the page boundaries correctly, or some of my assumptions do not hold.
Hello,
I would like to set a virtual address range as read-only, by using the
cuMemSetAccess
function.In this example, I am trying to set the page containing the function as read-only, but the call to
cuMemSetAccess
fails with the error: "invalid argument".I think I am using the right addresses, in terms of alignment and size. I've verified the correctness of it by dumping the PTEs of the device.
I'm not sure whether this problem is about using these functions in NVBIT or if I'm doing something wrong, thus I am not sure this is the right place to seek for help.
The text was updated successfully, but these errors were encountered: