@@ -77,7 +77,7 @@ FileHandle::FileHandle(FileHandle&& o) noexcept
77
77
_initialized{std::exchange (o._initialized , false )},
78
78
_compat_mode{std::exchange (o._compat_mode , CompatMode::AUTO)},
79
79
_nbytes{std::exchange (o._nbytes , 0 )},
80
- _handle {std::exchange (o._handle , {})}
80
+ _cufile_handle {std::exchange (o._cufile_handle , {})}
81
81
{
82
82
}
83
83
@@ -88,7 +88,7 @@ FileHandle& FileHandle::operator=(FileHandle&& o) noexcept
88
88
_initialized = std::exchange (o._initialized , false );
89
89
_compat_mode = std::exchange (o._compat_mode , CompatMode::AUTO);
90
90
_nbytes = std::exchange (o._nbytes , 0 );
91
- _handle = std::exchange (o._handle , {});
91
+ _cufile_handle = std::exchange (o._cufile_handle , {});
92
92
return *this ;
93
93
}
94
94
@@ -101,7 +101,7 @@ void FileHandle::close() noexcept
101
101
try {
102
102
if (closed ()) { return ; }
103
103
104
- _handle .unregister_handle ();
104
+ _cufile_handle .unregister_handle ();
105
105
_compat_mode = CompatMode::AUTO;
106
106
_fd_direct_off.close ();
107
107
_fd_direct_on.close ();
@@ -116,7 +116,7 @@ CUfileHandle_t FileHandle::handle()
116
116
if (is_compat_mode_preferred ()) {
117
117
throw CUfileException (" The underlying cuFile handle isn't available in compatibility mode" );
118
118
}
119
- return _handle .handle ();
119
+ return _cufile_handle .handle ();
120
120
}
121
121
122
122
int FileHandle::fd (bool o_direct) const noexcept
@@ -146,7 +146,7 @@ std::size_t FileHandle::read(void* devPtr_base,
146
146
if (sync_default_stream) { CUDA_DRIVER_TRY (cudaAPI::instance ().StreamSynchronize (nullptr )); }
147
147
148
148
KVIKIO_NVTX_SCOPED_RANGE (" cufileRead()" , size);
149
- ssize_t ret = cuFileAPI::instance ().Read (_handle .handle (),
149
+ ssize_t ret = cuFileAPI::instance ().Read (_cufile_handle .handle (),
150
150
devPtr_base,
151
151
size,
152
152
convert_size2off (file_offset),
@@ -170,7 +170,7 @@ std::size_t FileHandle::write(void const* devPtr_base,
170
170
if (sync_default_stream) { CUDA_DRIVER_TRY (cudaAPI::instance ().StreamSynchronize (nullptr )); }
171
171
172
172
KVIKIO_NVTX_SCOPED_RANGE (" cufileWrite()" , size);
173
- ssize_t ret = cuFileAPI::instance ().Write (_handle .handle (),
173
+ ssize_t ret = cuFileAPI::instance ().Write (_cufile_handle .handle (),
174
174
devPtr_base,
175
175
size,
176
176
convert_size2off (file_offset),
@@ -297,8 +297,13 @@ void FileHandle::read_async(void* devPtr_base,
297
297
*bytes_read_p =
298
298
static_cast <ssize_t >(read (devPtr_base, *size_p, *file_offset_p, *devPtr_offset_p));
299
299
} else {
300
- CUFILE_TRY (cuFileAPI::instance ().ReadAsync (
301
- _handle.handle (), devPtr_base, size_p, file_offset_p, devPtr_offset_p, bytes_read_p, stream));
300
+ CUFILE_TRY (cuFileAPI::instance ().ReadAsync (_cufile_handle.handle (),
301
+ devPtr_base,
302
+ size_p,
303
+ file_offset_p,
304
+ devPtr_offset_p,
305
+ bytes_read_p,
306
+ stream));
302
307
}
303
308
}
304
309
@@ -324,7 +329,7 @@ void FileHandle::write_async(void* devPtr_base,
324
329
*bytes_written_p =
325
330
static_cast <ssize_t >(write (devPtr_base, *size_p, *file_offset_p, *devPtr_offset_p));
326
331
} else {
327
- CUFILE_TRY (cuFileAPI::instance ().WriteAsync (_handle .handle (),
332
+ CUFILE_TRY (cuFileAPI::instance ().WriteAsync (_cufile_handle .handle (),
328
333
devPtr_base,
329
334
size_p,
330
335
file_offset_p,
0 commit comments