NumPy Persistence to Non-Volatile Memory
This library will help you persist numpy array structures into NVM devices.
Internally, it uses pynvm and buffers --which are
natively supported by numpy.
Installation
pip install npp2nvm
Requirements
- A NVM device, such as Intel(R) Optane(TM) DC Persistent Memory modules.
- Python 3.x
- numpy arrays to be stored.
Usage
Two environment variables are used for configuring the storage:
- NPP2NVM_SIZE which specifies the size (in MiB) that will be assigned to persistence
- NPP2NVM_PATH which specifies the file path that will be used for persistence.
Note that this file should be located into a Storage Class Memory device, which will
allow
pynvmto leverage its characteristics --keep in mind thatpynvmare bindings of the PMDK libraries.
Example
import numpy as np
import npp2nvm
a = np.random.random([256, 256])
a = npp2nvm.np_persist(a)
print(a.shape)
# > (256, 256)
Limitations
Storage and retrieval of data structures (outside the application lifecycle) are not implemented in this library (yet?). You can implement your own mechanism and/or propose a PR. It will be appreciated!
Metadata
Release files for npP2NVM 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| npP2NVM-0.2.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| npP2NVM-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / npP2NVM-0.2.tar.gz
| Download URL | npP2NVM-0.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e324d86711ae06234a4c1ec849248bfb853d01e2f44bf785e8f63a0d6f770d9
|
|
BLAKE2b-256 checksum How to use checksums |
32e215d11aed2f6cb1c67a3ce01eab913ac63a4694d28c8b41469a3b5e7c90c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
|
Release files / npP2NVM-0.2-py3-none-any.whl
| Download URL | npP2NVM-0.2-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2024941d3a76a333f5b4dc57e8b5166d40f78c1ed3e282e399ea58752676568
|
|
BLAKE2b-256 checksum How to use checksums |
bf0c0e71e501832e90d775377627e9170901d8235dd7d06cf163b91e069a69e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8
|