Skip to content

supporting operations transparently across multiple GPUs #2463

@gonzaloiglesiasiglesias

Description

It seems that AF cannot run operations transparantely across multiple gpus. For instance, I'm trying to do the following:

std::vector d = {1};
af::setDevice(0);
const af::array l1(1, d.data());
af::setDevice(1);
const af::array l2(1, d.data());
af::array r = l1 + l2;
std::vector o(1);
r.host(&o[0]);

This yields the error:
AfError: Input Array not created on current device

It would be really cool feature if arrayfire could handle this by transparently.

Related:

  • given the af::array l1, is there a method or function to know to retrieve that it was created in device 0, or do i have to do the book keeping myself?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions