Question About luid Field of cudaDeviceProp

I wrote a little program to display the CUDA properties of video cards and I am seeing something odd with it. There is a screenshot of it below. I have a two video cards in my system. When I call cudaGetDeviceCount it returns two devices. When I call cudeGetDeviceProperties and pass it indexes 0 and 1 it returns the same value in the luid field (locally unique identifier) for both indexes.

Can you think of any reason this might happen?

I am using Windows 10 and driver 430.53. I checked in the Nvidia Control Panel and SLI is enabled and it sees both cards. That’s why there are two device selection buttons at the top.

I don’t see any luid field listed in the documentation for cudaGetDeviceProperties

[url]CUDA Runtime API :: CUDA Toolkit Documentation

I do see a uuid field but it is 16 bytes long. If that is what you are looking at, maybe the first 4 bytes are the same.

Or maybe you have a bug in your code.

I am referring to the member in the cudaDeviceProp structure. Here is a listing of the first few members of the structure in driver_types.h :

/**
 * CUDA device properties
 */
struct __device_builtin__ cudaDeviceProp
{
    char         name[256];                  /**< ASCII string identifying device */
    cudaUUID_t   uuid;                       /**< 16-byte unique identifier */
    char         luid[8];                    /**< 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms */
    unsigned int luidDeviceNodeMask;         /**< LUID device node mask. Value is undefined on TCC and non-Windows platforms */
    // ...
};

It is the third one in the list. The structure is filled by calling :

cudaDeviceProp dp = { 0 };
cudaGetDeviceProperties( &dp, index );

When I pass indexes of 0 and 1 the results are identical when they should be unique.

From a documentation perspective, it seems to be undocumented. I would suggest not using it for that reason. (For example, use uuid instead).

It seems to be an 8-byte field, you only seem to be displaying 4 bytes. And I suppose if your Titan RTX’s happen to be in TCC mode then this whole thing may be moot anyway.

Other than that, you’re welcome to file a bug. You’ll likely be asked for a complete code that reproduces your observation.

I can’t remember now why I was using the luid. Oh well. I was displaying just four bytes because the first four have been all zeros on every card I have checked. The uuid does appear to be unique so I will just change to use it. Thanks for your assistance.

FWIW, I don’t have much use for this other than to note when a card has been changed out. Our maintenance personnel don’t always follow instructions exactly so this is an effort to watch for unexpected changes. That the luid does not change is not enough of an issue for me to worry about since I have a viable alternative. The curious thing is it used to work correctly on previous versions of the driver. The value I get now from the same cards differs from the one displayed in the screenshot.

Its certainly possible that there is a bug.

If it were me, I’m just saying I wouldn’t like to design my code based on undocumented features/functionality. I’m sure we can argue about that as well (whether it is documented, etc.), in that case I would have the same suggestion to file a bug.