Extracting data from cudnnBackendDescriptor_t

Hello, I’m recently struggling with extracting data from [cudnnBackendDescriptor_t variantPack]. As far as I know, the only way to extract data from cudnnBackendDescriptor_t is to use cudnnBackendGetAttribute API. However, it keeps showing me same error.

void printVariantPackPointers(cudnnBackendDescriptor_t variantPack) {
void* dataPointers[10];
int64_t count = 0;

int64_t requested_count = 10;
void* ptrValue = nullptr;
status = cudnnBackendGetAttribute(
    variantPack,
    CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS,
    CUDNN_TYPE_VOID_PTR,
    requested_count,
    &count,
    ptrValue
);
if (status == CUDNN_STATUS_SUCCESS) {
    std::cout << "Attribute (VOID_PTR): " << ptrValue << std::endl;
} else {
    std::cout << "Failed to get attribute: " << cudnnGetErrorString(status) << std::endl;
}

}

result : Failed to get attribute: CUDNN_STATUS_NOT_SUPPORTED

I would appreciate if someone fixes my code or point out the problem

I’m currently using CUDNN 8 version

Here are some insights regarding the CUDNN_STATUS_NOT_SUPPORTED error you are encountering while trying to extract data from a cudnnBackendDescriptor_t variant pack using the cudnnBackendGetAttribute API:

  1. Incorrect Attribute Values: Ensure that the attribute values you’re passing to the cudnnBackendGetAttribute function are correct as per the cuDNN documentation. Mismatched data types or unexpected formats can cause this error.
  2. Missing Required Attributes: Check if you have set the required attributes like CUDNN_ATTR_VARIANT_PACK_UNIQUE_IDS and CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS correctly. If any required attributes are missing or improperly set, it can lead to the CUDNN_STATUS_NOT_SUPPORTED error.
  3. Validation of Data Pointers: Make sure that the data pointers you are using in the variant pack descriptor are valid and properly initialized. Invalid or uninitialized pointers can trigger this error.
  4. Unsupported Descriptor Combination: Verify if the combination of descriptor attributes being used is supported in cuDNN version 8. The documentation may contain restrictions regarding attribute combinations; if your current combination isn’t supported, you may need to adjust it.