mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-22 02:30:26 +00:00
* add ortdevice class * add data transfer manager for copying tensors. * update * add data trasnfer for gpu * fix constexpr build break. * update * remove unnecessary header files. * remove unnecessary header files. * add dependency * add dependency * add dependency * add dependency * fix linux build break. * update * fix build break * fix build break * fix build break * update * update * update c api. * update to not use OrtCreateAllocatorInfo * change to all eps . * fix linux build break * remove useless codes. * update * move datatransfermanager in session state * update * fix cuda build break. * fix comments * fix windows GPU build. * fix comments * fix build break * fix comments * fix test failure * update * fix comments * fix onnx runtime server. * update * fix test failure. * fix comments * fix comment
21 lines
625 B
C++
21 lines
625 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#include "core/framework/data_transfer_manager.h"
|
|
#include "memcpy.h"
|
|
using namespace ONNX_NAMESPACE;
|
|
namespace onnxruntime {
|
|
|
|
Memcpy::Memcpy(const OpKernelInfo& info)
|
|
: OpKernel(info) {
|
|
provider_ = info.GetExecutionProvider();
|
|
}
|
|
|
|
Status Memcpy::Compute(OpKernelContext* ctx) const {
|
|
const auto* X = ctx->Input<Tensor>(0);
|
|
Tensor* Y = ctx->Output(0, X->Shape());
|
|
Status retval = Info().GetDataTransferManager().CopyTensor(*X, *Y, Info().GetKernelDef().ExecQueueId());
|
|
return retval;
|
|
}
|
|
|
|
} // namespace onnxruntime
|