ReferenceFull Library ReferenceNemo AutomodelNemo AutomodelComponentsModelsKimi K3Kda Fusednemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda

nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda

View as Markdown

Source text of the fused chunked Kimi-K3 KDA forward (CUDA) and its torch binding.

kda_fused._forward_ext hands these strings to torch.utils.cpp_extension.load_inline as cpp_sources = [HEADER, BINDING] and cuda_sources = [HEADER, KERNEL]; torch writes them to main.cpp and cuda.cu in the build directory and builds the extension once, so the wheel ships Python files only. The header is inlined into both translation units (there is no file to #include), which is why it carries no #pragma once.

Module Contents

Data

BINDING

CPP_SOURCES

CUDA_SOURCES

HEADER

KERNEL

API

nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda.BINDING = '// Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.\n//\n// License...
nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda.CPP_SOURCES = (HEADER, BINDING)
nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda.CUDA_SOURCES = (HEADER, KERNEL)
nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda.HEADER = '// Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.\n//\n// License...
nemo_automodel.components.models.kimi_k3.kda_fused.chunk_kda_fwd_cuda.KERNEL = '// Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.\n//\n// License...