Heuristic:Alibaba MNN Warning Deprecated Winograd Codegen
| Knowledge Sources | |
|---|---|
| Domains | GPU_Computing, Convolution, Code_Generation |
| Last Updated | 2026-02-10 12:00 GMT |
Overview
Deprecation warning for the Winograd kernel code generation tools located in the backupcode/ directory. These tools have been superseded by pre-generated static kernels integrated into the active codebase across all GPU backends.
Description
The files backupcode/winogradGenerateCL.cpp and backupcode/winogradGenerateGLSL.cpp are legacy code generation utilities that dynamically produce OpenCL and Vulkan GLSL Winograd transform kernels. They have been effectively replaced by:
- Pre-generated static OpenCL kernels in
source/backend/opencl/execution/cl/(e.g.,winogradTransformSource2_3_1.cl,winogradTransformDest2_3_1.cl) - Pre-generated static Vulkan GLSL shaders in
source/backend/vulkan/image/execution/glsl/(e.g.,winogradTransformSource2_3_1.comp,winogradTransformDest2_3_1.comp)
Evidence of deprecation:
- Files reside in the
backupcode/directory, indicating backup/archive status - No references to these files exist anywhere in the active build system or source code
- Active Winograd implementations span 6+ backends (CPU, OpenCL, CUDA, Metal, Vulkan, ARM82) with production-quality pre-compiled kernels
- The
backupcode/directory also contains other superseded code (3D convolution, BF16 variants)
Usage
This warning applies when encountering references to Winograd kernel generation from the backupcode/ directory. Use the active Winograd implementations in source/backend/ instead.
The Insight (Rule of Thumb)
- Action: Do NOT use the
backupcode/winograd*tools for generating production kernels. - Alternative: Use the pre-generated kernels already in
source/backend/opencl/execution/cl/andsource/backend/vulkan/image/execution/glsl/. - Trade-off: The backupcode tools offer flexibility for generating arbitrary F(m,r) configurations, but the pre-generated kernels are optimized and integrated into the build system.
Reasoning
The transition from dynamic code generation to pre-generated static kernels reflects a common maturation pattern in GPU computing frameworks. Pre-generated kernels:
- Are included in the build system and ship with the library
- Have been tested and validated across target hardware
- Avoid requiring users to run a separate code generation step
- Allow build-time optimizations specific to each target platform
The backupcode files are retained for historical reference and potential future use when new F(m,r) configurations need to be generated, but they are not part of the active pipeline.