-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgpu_txn_bridge.cu
36 lines (31 loc) · 1.15 KB
/
gpu_txn_bridge.cu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// Created by Shujian Qian on 2023-09-20.
//
#ifdef EPIC_CUDA_AVAILABLE
# include "gpu_txn_bridge.cuh"
# include "util_log.h"
# include <cstdio>
namespace epic {
//
// void GpuTxnBridge::StartTransfer(TxnBridgeStorage &storage)
//{
// if (storage.src_type == DeviceType::CPU && storage.dst_type == DeviceType::GPU) {
// cudaMemcpyAsync(storage.dest_ptr, storage.src_ptr, storage.txn_size * storage.num_txns, cudaMemcpyHostToDevice, copy_stream);
// } else if (storage.src_type == DeviceType::GPU && storage.dst_type == DeviceType::CPU) {
// cudaMemcpyAsync(storage.dest_ptr, storage.src_ptr, storage.txn_size * storage.num_txns, cudaMemcpyDeviceToHost, copy_stream);
// } else if (storage.src_type == DeviceType::GPU && storage.dst_type == DeviceType::GPU) {
// return;
// } else {
// auto &logger = Logger::GetInstance();
// logger.Warn("Unsupported transfer on Host using GpuTxnBridge::StartTransfer()");
// TxnBridge::StartTransfer(storage);
// }
//}
//
// void GpuTxnBridge::FinishTransfer(TxnBridgeStorage &storage)
//{
// cudaStreamSynchronize(copy_stream);
//}
//
}
#endif // EPIC_CUDA_AVAILABLE