| 62 | }; |
| 63 | |
| 64 | void SliceBoxingKernel::VirtualKernelInit(KernelContext* ctx) { |
| 65 | const SliceBoxingConf& conf = GetCustomizedBoxingConf(); |
| 66 | if (/*is_0size_tensor=*/std::any_of(conf.out_shape().dim().begin(), conf.out_shape().dim().end(), |
| 67 | [](int64_t dim) { return dim == 0; })) { |
| 68 | return; |
| 69 | } |
| 70 | const TensorSliceView out_slice(conf.out_slice()); |
| 71 | for (const TensorSliceViewProto& in_slice_proto : conf.in_slice()) { |
| 72 | const TensorSliceView in_slice(in_slice_proto); |
| 73 | tensor_slice_copier_vec_.emplace_back(new TensorSliceCopier( |
| 74 | out_slice, in_slice, this->kernel_conf().data_type(), ctx->stream()->device_type())); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | const std::vector<std::shared_ptr<TensorSliceCopier>>& SliceBoxingKernel::tensor_slice_copier_vec() |
| 79 | const { |
nothing calls this directly
no test coverage detected