Skip to content

More graceful way of using CuTensorMap #354

@kshyatt

Description

@kshyatt
const CUDAExt = Base.get_extension(TensorKit, :TensorKitCUDAExt)
@assert !isnothing(CUDAExt)
const CuTensorMap = getglobal(CUDAExt, :CuTensorMap)

This is awful!!!

What if instead, we defined CuTensorMap in src/TensorKit.jl but made it MethodError unless the extension is loaded (which would then provide the actual constructors).

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