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
If we call cuPointerGetAttribute() with CU_POINTER_ATTRIBUTE_MEMORY_TYPE, and pass a non-CUDA-allocated pointer, we get an error status: CUDA_ERROR_INVALID_VALUE. But actually - that is a perfectly reasonable thing to do, given an arbitrary pointer and wanting to check what CUDA has to say about it.
So, let's add support for doing this:
Added a memory type enum value for non-CUDA memory
Have type_of() detect this error and return the non-CUDA memory type instead of passing on an error.
The text was updated successfully, but these errors were encountered:
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
* Added a memory::type_t enum value, `non_cuda`, for memory not allocated by CUDA
* `memory::type_of()` will no longer fail for non-CUDA-allocated memory
* `copy_parameters_t<N>` is not out of `detail_`.
* The `endpoint_t` enum is now also out of `detail_`
* Beefed up `copy_parameters_t<N>` with additional convenience methods
*`copy_parameters_t<N>` now "recognizes" non-CUDA-allocated memory, treating it like CUDA host memory
* Our array-to-raw-mem copy function now determines the destination address' context
* Add an array-to-raw-mem copy function which takes the destination context explicitly
If we call
cuPointerGetAttribute()
withCU_POINTER_ATTRIBUTE_MEMORY_TYPE
, and pass a non-CUDA-allocated pointer, we get an error status:CUDA_ERROR_INVALID_VALUE
. But actually - that is a perfectly reasonable thing to do, given an arbitrary pointer and wanting to check what CUDA has to say about it.So, let's add support for doing this:
type_of()
detect this error and return the non-CUDA memory type instead of passing on an error.The text was updated successfully, but these errors were encountered: