Announcing the removal of the neuronxcc.nki namespace from neuronx-cc in Neuron 2.34#

Starting with Neuron 2.34, the neuronx-cc package no longer includes the deprecated neuronxcc.nki namespace. Code that imports neuronxcc.nki, neuronxcc.nki.language, neuronxcc.nki.isa, or another module under neuronxcc.nki fails with an import error.

Neuron 2.27 introduced the standalone nki package and announced the end of support for neuronxcc.nki (Announcing End of Support for neuronxcc.nki Namespace Starting with Neuron 2.28). The removal was postponed in later releases, and both namespaces continued to work. In Neuron 2.28 and later, the use of neuronxcc.nki inside an NKI kernel causes a compilation error. Neuron 2.34 removes the namespace from the package.

What you must do#

Replace the neuronxcc.nki imports in your code with imports from the standalone nki package:

Remove

Use instead

import neuronxcc.nki as nki

import nki

import neuronxcc.nki.language as nl

import nki.language as nl

import neuronxcc.nki.isa as nisa

import nki.isa as nisa

The nki package changes some NKI APIs and language constructs. Kernels written for neuronxcc.nki need more changes than the imports. For the complete procedure, see the NKI Kernel Migration Guide.

Who is affected#

You are affected if your code, tests, or scripts import any module under neuronxcc.nki. Kernels that already use the nki package are not affected.