Skip to content

Implementing Execution Device Policy #12

@coder3101

Description

@coder3101

A Computer comes with a lot of Devices that can be used for the evaluation of the expression. Our library should be able to take use of all those available devices efficiently. The Execution Device Policy feature specifies the device to be used during the evaluation of the expression. Some Devices that we have taken into consideration are as follow :

  • Sequencial Device
  • ThreadPool Device
  • GPU Device

We are thinking to use boost::compute for the task as it provides efficeint and fast way to run computation on various devices and it is fast at the same time. I will be implementing the expression templates using YAP that will be aware of the device to choose for evaluation. The Idea is as follow, Once implemented we should be able to write :

auto expr = A*B+C;
Tensor result = expr.via(Device::ThreadPool{4}); // Evaluate using 4 threads
Tensor res {expr.via(Device::GPU{ /*Args*/ ...})}; // Evaluate on GPU using OPENCL

Metadata

Metadata

Labels

codingImplementing the feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions