Skip to content

Commit

Permalink
Start preparing for versioned DLPack
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloferz committed May 28, 2024
1 parent b8e5c90 commit e1b7c6f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/DLPack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ using Requires

## Types ##

struct DLPackVersion
major::Cuint
minor::Cuint
end

@enum DLDeviceType::Cint begin
kDLCPU = 1
kDLCUDA = 2
Expand Down Expand Up @@ -110,6 +115,14 @@ mutable struct DLManagedTensor
end
end

mutable struct DLManagedTensorVersioned
version::DLPackVersion
manager_ctx::Ptr{Cvoid}
deleter::Ptr{Cvoid}
flags::Culonglong
dl_tensor::DLTensor
end

"""
Capsule
Expand Down

0 comments on commit e1b7c6f

Please sign in to comment.