Skip to main content

NumPy Persistence to Non-Volatile Memory

Project description

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 pynvm to leverage its characteristics --keep in mind that pynvm are 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npP2NVM-0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npP2NVM-0.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file npP2NVM-0.2.tar.gz.

File metadata

  • Download URL: npP2NVM-0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for npP2NVM-0.2.tar.gz
Algorithm Hash digest
SHA256 4e324d86711ae06234a4c1ec849248bfb853d01e2f44bf785e8f63a0d6f770d9
MD5 4bb6ce4c49aa97904abe5759ff6884e0
BLAKE2b-256 32e215d11aed2f6cb1c67a3ce01eab913ac63a4694d28c8b41469a3b5e7c90c0

See more details on using hashes here.

File details

Details for the file npP2NVM-0.2-py3-none-any.whl.

File metadata

  • Download URL: npP2NVM-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for npP2NVM-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e2024941d3a76a333f5b4dc57e8b5166d40f78c1ed3e282e399ea58752676568
MD5 6c6b519e5fe587a102f37b5c3b651694
BLAKE2b-256 bf0c0e71e501832e90d775377627e9170901d8235dd7d06cf163b91e069a69e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page