Functions for dealing with tensors with the compute system
Functions for dealing with tensors with the compute system
(assign! lhs rhs & [options])
assign rhs to lhs returning lhs
assign rhs to lhs returning lhs
(clone-to-device input-tens)
(clone-to-device input-tens options)
Clone a host tensor to a device. Tensor must have relatively straighforward dimensions (transpose OK but arbitrary reorder or offset not OK) or :force? must be specified. options: :force? Copy tensor to another buffer if necessary. :sync? Sync with stream to ensure copy operation is finished before moving forward.
Clone a host tensor to a device. Tensor must have relatively straighforward dimensions (transpose OK but arbitrary reorder or offset not OK) or :force? must be specified. options: :force? Copy tensor to another buffer if necessary. :sync? Sync with stream to ensure copy operation is finished before moving forward.
(clone-to-host device-tens)
(clone-to-host device-tens options)
Copy this tensor to the host. Synchronized by default.
Copy this tensor to the host. Synchronized by default.
(ensure-device input-tens)
(ensure-device input-tens options)
Ensure a tensor can be used on a device. Some devices can use CPU tensors.
Ensure a tensor can be used on a device. Some devices can use CPU tensors.
(ensure-host device-tens)
(ensure-host device-tens options)
Ensure this tensor is a 'host' tensor. Synchronized by default.
Ensure this tensor is a 'host' tensor. Synchronized by default.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close