Skip to content

[QST] DLPack: kDLCUDAManaged is never used #1234

Description

@lennartvoelz

Context

When studying the DLPack header I realized that there is an explicit kDLCUDAManaged device type (see include/matx/core/dlpack.h:104) that is not emitted in the MatX repo. MatX still uses this fallback (tensor.h:1509):

// We have a record of this pointer and can map it from the record
switch (kind) {
    case MATX_MANAGED_MEMORY:
    case MATX_DEVICE_MEMORY:
    case MATX_ASYNC_DEVICE_MEMORY:
        t->device.device_type = kDLCUDA;
        t->device.device_id = dev_ord;
        break;

This is not 'wrong' but I wondered if there is any particular reason for doing so, or if it is simply a stale artifact that should be 'fixed'.
If this is intended, it might be helpful to add a short comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions