Skip to content

Global variables throw uncaught exceptions in CUDA backend #167

@pavanky

Description

@pavanky

This following snippet of code throws an exception.

#include <arrayfire.h>
#include <stdio.h>

const int samples = 20e6;
const int iters = 100;
using namespace af;

array a;

int main()
{
    try {
        a = randu(samples, 1);
        af::sync();

    } catch (af::exception &ex) {
        printf("%s\n", ex.what());
    } catch (...) {
        printf("Something went wrong\n");
    }
    return 0;
}

Exception:

terminate called after throwing an instance of 'AfError'
  what():  CUDA Error (29): driver shutting down

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions