InteractiveUtils is not aware of CuDevice type

Hello there,

it seems that the info methods provided by InteractiveUtils do not work with the CuDevice type. For example, in the following code

using CUDAdrv

dev = first(devices())

methodswith(dev)

methods(capability)

methodswith reports no matching method, while methods(capability) properly reports capability(dev::CuDevice) in CUDAdrv .... The same goes for supertype and subtypes. CuDevice is exported from CUDAdrv.

I know this is not a big deal, but I maybe it’s worth a mention.

You need to use the type with methodswith:

julia> using CUDAdrv

julia> dev = first(devices())
CuDevice(0): Quadro RTX 5000

julia> methodswith(typeof(dev))
[1] ==(a::CuDevice, b::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:31
[2] convert(::Type{Int32}, dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:29
[3] hash(dev::CuDevice, h::UInt64) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:32
[4] show(io::IO, ::MIME{Symbol("text/plain")}, dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:35
[5] attribute(dev::CuDevice, code::CUDAdrv.CUdevice_attribute_enum) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:76
[6] capability(dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:129
[7] name(dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:51
[8] totalmem(dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:64
[9] warpsize(dev::CuDevice) in CUDAdrv at /home/tim/Julia/pkg/CUDAdrv/src/devices.jl:121

Well that’s embarrassing :slight_smile: Thanks!