mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-21 21:39:15 +00:00
Rangify constructor of HostTensorDescriptor & Tensor<> (#445)
* Rangify STL algorithms
This commit adapts rangified std::copy(), std::fill() & std::transform()
* Rangify check_err()
By rangifying check_err(), we can not only compare values between
std::vector<>s, but also compare any ranges which have same value
type.
* Allow constructing Tensor<> like a HostTensorDescriptor
* Simplify Tensor<> object construction logics
* Remove more unnecessary 'HostTensorDescriptor' objects
* Re-format example code
* Re-write more HostTensorDescriptor ctor call
[ROCm/composable_kernel commit: 4a2a56c22f]
This commit is contained in:
@@ -57,7 +57,7 @@ bool run_permute_bundle(const Problem& problem)
|
||||
using std::begin;
|
||||
|
||||
Tensor<DataType> input_tensor(input_shape);
|
||||
ranges::copy(input_bundle_tensor.AsSpan<const DataType>(), begin(input_tensor));
|
||||
ck::ranges::copy(input_bundle_tensor.AsSpan<const DataType>(), begin(input_tensor));
|
||||
|
||||
Tensor<DataType> output_tensor(transpose(input_shape, input_axes));
|
||||
if(!host_permute(input_tensor, input_axes, PassThrough{}, output_tensor))
|
||||
|
||||
Reference in New Issue
Block a user