Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

unittest fail when CUDA device not available #59

Description

@paskino

The current method used to detect CUDA availability fails miserably

import astra
use_cuda = True
try:
    astra.test_CUDA()
except RuntimeError as re:
    print (re)
    use_cuda = False
except:
    print ("Crash!")
    use_cuda = False

The error is the following and is not properly handled in Python, I suppose

Error: CUDA error 35: CUDA driver version is insufficient for CUDA runtime version.
Error: Failed to allocate 32x2 GPU buffer
python: ./../../src/CudaForwardProjectionAlgorithm.cpp:276: virtual void astra::CCudaForwardProjectionAlgorithm::run(int): Assertion `ok' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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