Skip to content

Rework hasAccelerator() to require types instead of instances #23

@fwege

Description

@fwege

The current implementation of hasAccelerator() requires the creation of an istance of type T <: AbstractAccelerator.
As the default constructor of CUDAccelerator() creates an instance of CuDevice() this is only possible if CUDA Drivers are available...
https://github.com/RWTH-ACS/CAMNAS.jl/blob/main/src/mna_solver.jl#L310-L313

function has_accelerator(accelerator::T) where T <:AbstractAccelerator
    global accelerators_vector
    findfirst(x -> typeof(x) == typeof(accelerator), accelerators_vector) !== nothing
end

FIx: We shoud modify hasAccelerator() to require types, not instances of accelerators.

Originally posted by @fwege in #19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions