-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'branch-24.10' of https://github.com/rapidsai/kvikio int…
…o s3_support
- Loading branch information
Showing
8 changed files
with
124 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | ||
# See file LICENSE for terms. | ||
|
||
from kvikio._lib import buffer # type: ignore | ||
|
||
|
||
def memory_register(buf) -> None: | ||
"""Register a device memory allocation with cuFile. | ||
Warning | ||
------- | ||
This API is intended for usecases where the memory is used as a streaming | ||
buffer that is reused across multiple cuFile IO operations. | ||
Parameters | ||
---------- | ||
buf: buffer-like or array-like | ||
Device buffer to register . | ||
""" | ||
return buffer.memory_register(buf) | ||
|
||
|
||
def memory_deregister(buf) -> None: | ||
"""Deregister an already registered device memory from cuFile. | ||
Parameters | ||
---------- | ||
buf: buffer-like or array-like | ||
Device buffer to deregister . | ||
""" | ||
buffer.memory_deregister(buf) | ||
|
||
|
||
def bounce_buffer_free() -> int: | ||
"""Free the host allocations used as bounce buffers. | ||
Returns | ||
------- | ||
Number of bytes freed. | ||
""" | ||
return buffer.bounce_buffer_free() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters