Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added NPM to Glossary and linked to mentions
  • Loading branch information
nihalshetty-boop committed Aug 5, 2021
commit 2ba22a34d3ae7913ec0e109f0460f930e0f1fad4
10 changes: 5 additions & 5 deletions docs/source/developer/numba-runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Notes on Numba Runtime

The *Numba Runtime (NRT)* provides the language runtime to the *nopython mode*
Python subset. NRT is a standalone C library with a Python binding. This
allows NPM runtime feature to be used without the GIL. Currently, the only
allows :term:`NPM` runtime feature to be used without the GIL. Currently, the only
language feature implemented in NRT is memory management.


Memory Management
=================

NRT implements memory management for NPM code. It uses *atomic reference count*
NRT implements memory management for :term:`NPM` code. It uses *atomic reference count*
for threadsafe, deterministic memory management. NRT maintains a separate
``MemInfo`` structure for storing information about each allocation.

Expand All @@ -23,8 +23,8 @@ Cooperating with CPython

For NRT to cooperate with CPython, the NRT python binding provides adaptors for
converting python objects that export a memory region. When such an
object is used as an argument to a NPM function, a new ``MemInfo`` is created
and it acquires a reference to the Python object. When a NPM value is returned
object is used as an argument to a :term:`NPM` function, a new ``MemInfo`` is created
and it acquires a reference to the Python object. When a :term:`NPM` value is returned
to the Python interpreter, the associated ``MemInfo`` (if any) is checked. If
the ``MemInfo`` references a Python object, the underlying Python object is
released and returned instead. Otherwise, the ``MemInfo`` is wrapped in a
Expand Down Expand Up @@ -184,5 +184,5 @@ The plan for NRT is to make a standalone shared library that can be linked to
Numba compiled code, including use within the Python interpreter and without
the Python interpreter. To make that work, we will be doing some refactoring:

* numba NPM code references statically compiled code in "helperlib.c". Those
* numba :term:`NPM` code references statically compiled code in "helperlib.c". Those
functions should be moved to NRT.
1 change: 1 addition & 0 deletions docs/source/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Glossary
"lowering" stems from the fact that LLVM IR is low-level and
machine-specific while Numba IR is high-level and abstract.

NPM
nopython mode
A Numba compilation mode that generates code that does not access the
Python C API. This compilation mode produces the highest performance
Expand Down