0

As a side question to Use Vulkan VkImage as a CUDA cuArray, how could I get more details on what's wrong on a CUDA Driver API call that returns CUDA_ERROR_INVALID_VALUE?

Specifically, the call is to cuExternalMemoryGetMappedMipmappedArray() and the documentation does not list CUDA_ERROR_INVALID_VALUE among its return values.

Any suggestions on how to go about debugging this issue?

einpoklum
  • 118,144
  • 57
  • 340
  • 684
jsantander
  • 4,972
  • 16
  • 27
  • 1
    The documentation states: "Note that this function may also return error codes from previous, asynchronous launches." See [here](https://stackoverflow.com/a/14038590/7968757) for info about how to debug CUDA code. – BlameTheBits Mar 30 '19 at 14:06
  • @Shadow, Thanks. Note this is the driver API, can I use `cudaDeviceSynvhronize()`?. I did try calling `cuCtxSynchronize()` before the failing call, but the `cuCtxSynchronize` did not return any errors and the other call still failed with the same code – jsantander Mar 30 '19 at 14:24
  • 1
    CUDA is not very forthcoming with information on errors. In my limited experience, usually the driver API documentation has the most information you can find. – einpoklum Mar 30 '19 at 16:28

1 Answers1

1

Specifically, the call is to cuExternalMemoryGetMappedMipmappedArray() and the documentation does not list CUDA_ERROR_INVALID_VALUE among its return values.

That appears to be have been a transient documentation error. The current documentation linked in the question (CUDA 11.5 at the time of writing), shows CUDA_ERROR_INVALID_VALUE as an expected return value.

As for the debugging part, the function only has two inputs, the memory object handle, and the array descriptor. One of those is invalid. It should be trivial to debug if you know that the function call is returning the error, and not a prior call.

talonmies
  • 70,661
  • 34
  • 192
  • 269