class nbla::BackendBase

class BackendBase

Base class of singleton classes for storing some handles or configs for computation on a backend.

Subclassed by nbla::Cpu

Public Functions

virtual vector<string> array_classes() const = 0

Available array class list used in CPU Function implementations.

virtual void _set_array_classes(const vector<string> &a) = 0

Set array class list.

Note

Dangerous to call. End users shouldn’t call.

virtual void register_array_class(const string &name) = 0

Register array class to available list by name.

virtual shared_ptr<Allocator> caching_allocator() = 0

Get a caching allocator.

virtual shared_ptr<Allocator> naive_allocator() = 0

Get a no-cache allocator.

virtual void free_unused_host_caches() = 0

Free all unused host memory caches.

virtual void device_synchronize(const string &device) = 0

Synchronize host to device.

virtual void default_stream_synchronize(const string &device) = 0

Synchronize host to default stream of device.

virtual void create_lms_streams(int device = -1) = 0

Create non blockuing streams for data transfer.