Skip to content

Commit

Permalink
Handle init with default args
Browse files Browse the repository at this point in the history
  • Loading branch information
tjruwase committed Aug 16, 2024
1 parent 9b68819 commit a595e39
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deepnvme/file_access/aio_load_cpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main():
file_sz = os.path.getsize(input_file)
cnt = args.loop

aio_handle = AsyncIOBuilder().load().aio_handle(1024**2, 128, True, True, 1)
aio_handle = AsyncIOBuilder().load().aio_handle()
bounce_buffer = torch.empty(os.path.getsize(input_file), dtype=torch.uint8).pin_memory()

t = timeit.Timer(functools.partial(file_read, input_file, aio_handle, bounce_buffer))
Expand Down
2 changes: 1 addition & 1 deletion deepnvme/file_access/aio_load_gpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def main():
file_sz = os.path.getsize(input_file)
cnt = args.loop

aio_handle = AsyncIOBuilder().load().aio_handle(1024**2, 128, True, True, 1)
aio_handle = AsyncIOBuilder().load().aio_handle()
bounce_buffer = torch.empty(os.path.getsize(input_file), dtype=torch.uint8).pin_memory()

t = timeit.Timer(functools.partial(file_read, input_file, aio_handle, bounce_buffer))
Expand Down
2 changes: 1 addition & 1 deletion deepnvme/file_access/aio_store_cpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
file_sz = args.mb_size*(1024**2)
app_tensor = torch.empty(file_sz, dtype=torch.uint8, device='cpu', requires_grad=False)

aio_handle = AsyncIOBuilder().load().aio_handle(1024**2, 128, True, True, 1)
aio_handle = AsyncIOBuilder().load().aio_handle()
bounce_buffer = torch.empty(file_sz, dtype=torch.uint8, requires_grad=False).pin_memory()


Expand Down
2 changes: 1 addition & 1 deletion deepnvme/file_access/aio_store_gpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
file_sz = args.mb_size*(1024**2)
app_tensor = torch.empty(file_sz, dtype=torch.uint8, device='cuda', requires_grad=False)

aio_handle = AsyncIOBuilder().load().aio_handle(1024**2, 128, True, True, 1)
aio_handle = AsyncIOBuilder().load().aio_handle()
bounce_buffer = torch.empty(file_sz, dtype=torch.uint8, requires_grad=False).pin_memory()


Expand Down
2 changes: 1 addition & 1 deletion deepnvme/file_access/gds_load_gpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main():
file_sz = os.path.getsize(input_file)
cnt = args.loop

gds_handle = GDSBuilder().load().gds_handle(1024**2, 128, True, True, 1)
gds_handle = GDSBuilder().load().gds_handle()
gds_buffer = gds_handle.new_pinned_device_tensor(file_sz, torch.empty(0, dtype=torch.uint8, device='cuda', requires_grad=False))

t = timeit.Timer(functools.partial(file_read, input_file, gds_handle, gds_buffer))
Expand Down
2 changes: 1 addition & 1 deletion deepnvme/file_access/gds_store_gpu_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
file_sz = args.mb_size*(1024**2)
app_tensor = torch.empty(file_sz, dtype=torch.uint8, device='cuda', requires_grad=False)

gds_handle = GDSBuilder().load().gds_handle(1024**2, 128, True, True, 1)
gds_handle = GDSBuilder().load().gds_handle()
gds_buffer = gds_handle.new_pinned_device_tensor(file_sz, torch.empty(0, dtype=torch.uint8, device='cuda', requires_grad=False))

t = timeit.Timer(functools.partial(file_write, output_file, app_tensor, gds_handle, gds_buffer))
Expand Down

0 comments on commit a595e39

Please sign in to comment.