需求大类 特性 描述 涉及配置 当前支持情况 PyTorch是否弃用 优先级 分析负责人 工作量/人月
图捕获与区域编译 fake tensor缓存 对满足可缓存条件的 fake-op dispatch 结果做进程级或 ShapeEnv 级缓存;key 包含 op、默认 dtype/device、inference mode、ShapeEnv 设置和输入 metadata。 "fake_tensor_cache_enabled
fake_tensor_cache_crosscheck_enabled" 部分支持。MLIR/DVM会全局禁用 否 高 余坚峰 2
配置小图不编译 图捕获时控制FX图达到多少op才创建图 minimum_call_count 已废弃 是 低 余坚峰
限制Python code object的编译次数 限制同一个 Python code object 跨所有对象实例、输入组合的累计编译次数,默认值为256。上限达到后,默认停止继续编译并回退 eager "accumulated_recompile_limit
accumulated_cache_size_limit" 已支持 否 中 余坚峰
限制单个对象的编译次数 限制同一组 ID_MATCH 对象(例如同一个 nn.Module 实例)的编译版本数,默认值为 8。上限达到后,默认停止继续编译并回退 eager "recompile_limit
cache_size_limit" 已支持 否 中 余坚峰
重编译时报错 只要已有 Dynamo cache entry 因 guard miss 将要首次重编译,就立即抛 RecompileError error_on_recompile 已支持 否 低 余坚峰
达到重编译上限时报错 达到 recompile_limit 或 accumulated_recompile_limit 时由 eager fallback 改为抛 FailOnRecompileLimitHit;与 suppress_errors 不兼容,fullgraph=True 下命中上限本来也会抛错。 "fail_on_recompile_limit_hit
fail_on_cache_limit_hit" 已支持 否 低 余坚峰
重编译超限后跳过调用栈 控制重编译次数超限后是否递归 skip 调用栈 "skip_code_recursive_on_recompile_limit_hit
skip_code_recursive_on_cache_limit_hit" 已废弃 是 低 余坚峰
invoke_subgraph 区域编译 实验性测试开关:允许 torch.compiler.nested_compile_region 生成的 invoke_subgraph HOP 携带区域后端配置,使子图可由 Regional Inductor 独立编译和缓存,降低大型重复区域的峰值编译开销;默认关闭。 enable_invoke_subgraph_regional_compile 当前 torch_npu 2.9 不支持。原生 PyTorch 2.11 首次提供该实验性配置且标注“仅用于测试”;torch_npu 2.9 虽有 invoke_subgraph lowering,但没有该配置及 Regional Inductor 接线。 否 中 余坚峰
图缓存与预编译封装 Dynamo预编译package 实验性,序列化 guards/bytecode、Bundled AOTAutograd backend、Inductor、autotune等编译产物 caching_precompile 部分支持。910B3 默认 Triton Ascend 路径已验证跨进程热加载,热进程中 compile_fx 未被调用;但 MLIR、DVM、AscendC、训练反向和跨机器工件兼容尚未完整覆盖。 否 高 余坚峰 3
严格预编译package 与 caching_precompile 配套:guard 无法序列化或 package 发生 bypass 时,把 warning/跳过 entry 升级为 PackageError,用于严格发现预编译不完整。 strict_precompile 部分支持。910B3 默认 Triton Ascend 路径已验证跨进程热加载,热进程中 compile_fx 未被调用;但 MLIR、DVM、AscendC、训练反向和跨机器工件兼容尚未完整覆盖。 否 中 余坚峰
FX图缓存 以 FX 图、输入 guards、系统/编译配置为 key,持久化 Inductor 编译产物;命中后避免再次 codegen/compile。 fx_graph_cache 部分支持,某些用例失败,例如tensor constant 序列化失败 否 高 余坚峰 1
Triton编译二进制打包 将 Triton 编译二进制随 FX graph cache entry 打包;命中时释放到当前 Triton cache 目录,避免二次编译。 bundle_triton_into_fx_graph_cache 已支持 否 中 余坚峰
异步编译调度与资源治理 控制异步 kernel 编译 worker 数 控制异步 kernel 编译 worker 数;1 为同步编译,默认按 CPU affinity 取不超过 32。 compile_threads 已支持 否 中 余坚峰
控制等待每个异步编译的最大秒数 等待每个异步编译 future 的最大秒数,0 表示无限;超时时标出对应 kernel,避免编译永久挂起。 compile_worker_wait_timeout torch_npu 2.13.0rc1支持,是PyTorch 2.13 新增的 Inductor 配置 否 中 余坚峰
检查未完成的编译任务 周期检查 sidecar 中长时间未完成的编译任务,输出任务阶段、结构化诊断/tlparse 事件;0 关闭。 compile_worker_watchdog_interval_seconds 未支持,在PyTorch 2.14.0-rc1首次发布 否 中 余坚峰
异步编译 worker 池静默回收 一个 compile context 结束后让 sidecar 内部 worker pool 退出,后续任务再唤醒,以回收空闲资源;2.9 默认关闭。 quiesce_async_compile_pool 部分支持,默认 NPU 通用池完整支持;MLIR/DVM 的 CustomAsyncCompile 自持一套 pool,继承的 quiesce 不会关闭它。 否 中 余坚峰
异步编译池空闲回收延时 最后一个任务完成后空闲指定秒数再 quiesce,而不是 compile context 一结束立即处理。 quiesce_async_compile_time PyTorch 2.10.0或以上支持 否 中 余坚峰
选择异步编译进程启动方式 选择异步编译进程启动方式:subprocess、fork 或 spawn。 worker_start_method 部分支持。默认 NPU 通用 AsyncCompile 支持三种模式;MLIR/DVM CustomAsyncCompile 固定使用 SubprocPool,忽略该项。 否 中 余坚峰
预编译超时 为 AlgorithmSelector 等待并行候选 future 设置上限;当前超时会抛 TimeoutError,不会可靠取消仍在后台运行的任务,也没有自动 fallback。 precompilation_timeout_seconds 支持 CATLASS/NPU Triton template 的“候选预编译等待超时”,不支持普通 kernel 和其他 NPU 编译后端的统一超时。 否 中 余坚峰
远端缓存与跨机复用 FX远端图缓存 把 FX graph cache entry 存入远端 backend,使进程/机器共享;本地 cache 可独立关闭。 fx_graph_remote_cache 部分支持。NPU 复用通用路径。910B3 mock backend 实测首次 remote miss→put,Dynamo reset 后 remote hit 且结果正确;默认 OSS 仍需 Redis/client 配置,真实跨机 NPU artifact 可移植性未证明。 否 中 余坚峰
autotune配置打包远端缓存 把一批 .best_config 按编译/backend hash 打成单个远端对象,命中时批量回填本地 cache,减少逐 kernel 请求。 bundled_autotune_remote_cache 已支持 否 中 余坚峰
CUTLASS binary cache覆盖 强制覆盖远端 CUTLASS binary cache 的同名 key,用于重新发布/纠正二进制。 cutlass.binary_remote_cache_force_write CATLASS 等价能力未支持。CATLASS 没有 binary remote cache,自然也没有强制覆盖路径。 否 低 余坚峰
CUTLASS kernel binary 上传到远端 将已编译 CUTLASS kernel binary 上传到远端,供其他进程/机器复用。 cutlass.upload_to_binary_remote_cache CATLASS 等价能力未支持。当前只有本地 content-addressed binary cache,没有远端 put/upload。 否 中 余坚峰
使用远端 CUTLASS binary 编译前从远端查询并下载 CUTLASS binary,命中时跳过本机编译。 cutlass.use_binary_remote_cache CATLASS 等价能力未支持。CATLASS compile 只查进程内 dict 与本地输出文件,没有远端 get/download。 否 中 余坚峰
远端 cache 写入non_blocking 把远端 cache 写入放到后台,避免网络延迟阻塞 compile 主线程;需要退出 flush、队列上限和错误处理。 non_blocking_remote_cache_write 未支持。2.9 虽有配置,但 OSS RemoteCache.put 同步调用 backend;910B3 mock 实测设为 True 后 put 仍发生在 MainThread。 否 中 余坚峰
gemm autotune远端缓存 远端生成/查询 GEMM 最优 autotune config,使未在本机 profile 的 shape 也能取得候选。 remote_gemm_autotune_cache 未支持。PyTorch 2.9 OSS 实现直接抛 NotImplementedError;NPU MM lowering 自行组合 ATen/CATLASS choices,没有调用该服务。 否 低 余坚峰
缓存策略、正确性与并发安全 禁用compile缓存 在一次 compile 中统一禁用/隔离 FX graph、autotune 等缓存,常用于复现、调试和正确性比对。 force_disable_caches 部分支持。通用 FX cache 和 NPU Triton autotuner 会禁用;但 CATLASSCodeCache、候选 LRU 和 CATLASS AlgorithmSelector timing cache均不检查该开关,仍可能复用。 否 中 余坚峰
非标准函数声明为可缓存 用户把非标准函数声明为可缓存,并把自报版本值纳入 AOT/FX cache key;错误声明可能复用不安全结果。 unsafe_marked_cacheable_functions 已支持 否 低 余坚峰
无条件把动态 shape guards 视为命中 cache lookup 时无条件把动态 shape guards 视为命中,以提高复用但可能产生错误结果。 unsafe_skip_cache_dynamic_shape_guards 已支持 否 低 余坚峰
Inductor cache 文件锁的等待超时 配置 Inductor cache 文件锁的等待超时,避免并发编译永久等待。 file_lock_timeout PyTorch 2.10.0或以上支持 否 中 余坚峰
后端/硬件专项优化 缓存 SDPA 输入的 layout/stride constraint 缓存 SDPA 输入的 layout/stride constraint;同一 tensor 同时作为 K/V 等参数时复用转换,避免重复 copy buffer,同时区分 mutation/name。 cache_sdpa_constraint PyTorch 2.12.0或以上支持。NPU 上为“条件支持”:只有编译图中的 SDPA 走原生 Inductor sdpa_constraint 调用链时才生效;若走 torch_npu 自定义的 npu_fusion_attention 等独立 lowering,则该开关不会产生作用 否 中 余坚峰
指定GEMM的M/N/K cache blocking 手工指定 CPU C++ GEMM 的 M/N/K cache blocking,依据 CPU L1/L2 容量切块。 cpp.gemm_cache_blocking 不适用(CPU 专属)。消费点要求 layout.device.type == "cpu";NPU GEMM 走 ATen/CATLASS。 否 低 余坚峰
Triton跳过L1 cache 对只使用一次的输入给 Triton load 添加绕过 L1 的 cache hint(CUDA 路径为 .cg),以减少 L1 污染。 triton.skip_l1_cache 部分支持。NPU no_linear 路径继承通用 load 并读取开关;默认 linear 使用 NPUIndexTritonKernel 的重写 load,完全不读取该项,而且 .cg 在 Triton Ascend 的硬件等价语义尚无证据。 否 低 余坚峰
代码生成与二进制产物缓存 C++头文件预编译 为 C++ wrapper/CPU kernel 的公共头生成 PCH,减少重复 C++ 编译时间。 cpp_cache_precompile_headers 部分支持。2.9 开关及 CppWrapperCodeCache 存在,NPU CppWrapperNpu 会换成 NPU 头;但 Excel 所列环境变量在 2.9 被忽略,实测设 0 后配置仍为 True。 否 中 余坚峰
CUTLASS template codegen结果缓存 缓存 CUDA CUTLASS template codegen 结果,减少重复生成与编译。 cutlass.enable_caching_codegen CATLASS 等价能力部分支持。CATLASS 缓存候选生成,并以“源码+完整 Bisheng 命令”缓存本地 .so/.o;但没有独立 render/codegen cache,也没有开关。 否 中 余坚峰
Triton template缓存 缓存 Triton template 的 generate/render 结果,避免相同模板反复生成 Python/Triton 源码。 enable_caching_generated_triton_templates 部分支持。通用 TritonTemplate 消费该项;NPU 专用 NPUTritonTemplate.generate 直接 render 后进 PyCodeCache,没有按该项启停和 replay。 否 中 余坚峰
保留 raw cubin缓存 在序列化 static CUDA launcher cache 时保留 raw cubin,使原 cubin 文件删除后仍可恢复;代价是 cache 变大。 keep_static_cubin_raw 不支持,NPU 保存 .npubin,未走只支持 cubin/CUDA 的 StaticCudaLauncher。 否 低 余坚峰
Autotune 缓存与配置检索 缓存 Triton autotune配置 保存 Triton autotune 获胜配置;查询时先本地后远端,成功后可同时写两处。 "autotune_local_cache
autotune_remote_cache" local支持,远端需redis部署测试 否 中 余坚峰
Triton autotune查找 以去名称后的 Triton 源码和 size 信息构造 hash,从静态表直接选择预设 config,并把命中项传给异步 worker。 autotune_lookup_table 默认 Triton 路径已支持,MLIR/DVM 非 Triton 路径不适用。 否 中 余坚峰
lookup_table 读取 template override table 时,用 template_hash 过滤源代码已变化的陈旧 config。 lookup_table.check_src_hash NPU 总体部分支持;CATLASS 未支持。2.9 legacy Triton lookup key 包含源码 SHA256,但 CATLASS 未接入新版 override table;CATLASS binary 的源码 hash 也不能替代 table entry 校验。 否 中 余坚峰
lookup_table 提供 template→预选 autotune config 的结构化 override table,按 kernel/shape/source 等维度命中。 lookup_table.table NPU 总体部分支持;CATLASS 未支持。legacy Triton 表的 schema/匹配粒度不同;CATLASS 缺少 NPU device key、template id/hash、参数 schema 和反序列化接入。 否 中 余坚峰
搜索已有 autotune cache 允许在未启用完整 max-autotune 时搜索已有 autotune cache。 search_autotune_cache 已废弃 是 低 余坚峰
编译诊断与扩展接口 Triton JIT post-compile hook Inductor 直接调用 triton.compile 后模拟 Triton JIT post-compile hook,供调试/集成逻辑读取编译结果。 run_jit_post_compile_hook 未支持 NPU Triton。通用 2.9 路径有 flag/hook;NPU 覆写 NPUCachingAutotuner.precompile,没有调用 hook。 否 低 余坚峰
异步编译等待时显示进度 异步编译等待时显示 future/kernel key 的进度条,便于定位耗时 kernel。 verbose_progress 已支持 否 低 余坚峰
模板融合 epilogue/prologue融合 把模板/主算子之前的单次使用 pointwise 计算(prologue)或之后的 pointwise 后处理(epilogue)合入同一生成内核,减少中间张量、显存/片上存储访问和 kernel launch。 "epilogue_fusion
prologue_fusion" 部分支持。默认 Triton Ascend 路径已有模板前后融合代码;DVM 明确支持 matmul + pointwise epilogue;CATLASS 支持受算子、SoC 和额外开关约束。DVM 与 CATLASS 当前不支持 prologue,因此不能概括为全后端完整支持。 否 高 余坚峰 2
调整融合优先级 调整融合候选排序,使模板 epilogue 候选优先于普通融合,降低先发生其他融合而错失模板融合的概率;不改变融合合法性。 epilogue_fusion_first 已支持 否 中 余坚峰
用户自定义 Triton kernel 的 epilogue 融合 对满足限制的用户 Triton kernel 做源码/AST 分析,将单一 tl.store 的写值替换成融合后的 pointwise 表达式,并删去中间输出分配。 epilogue_fusion_user_defined_triton_kernel 未支持 否 中 余坚峰
epilogue融合atomic_add 允许把 scatter/mutation 形式的 atomic_add 融进 Triton 模板 epilogue;默认关闭,因为索引竞争度会显著影响收益。 epilogue_fusion_with_atomic_add 原生 PyTorch 从 2.13.0-rc1 开始支持、2.13.0 首次正式支持;torch_npu 2.13.0rc1 仅配置可见且部分具备 Triton 单模板条件,截至当前没有可确认的完整支持版本。 否 中 余坚峰
GEMM 候选生成与调优 参与 profile 的 Universal GEMM 候选数量限制 限制 max-autotune 时参与 profile 的 NVIDIA Universal GEMM 候选数量;主线默认 10,0/None/all 表示全部候选。 nvgemm_max_profiling_configs CATLASS 等价能力已支持(catlass_max_profiling_configs) 否 中 余坚峰
补充 NVGEMM 启发式候选 在 NVIDIA 启发式候选之外加入经验性的 tile/cluster 组合,覆盖某些 decode 形状的性能盲点。 nvgemm_supplement_configs CATLASS 等价能力部分支持。CATLASS 会用 tile heuristic 自动扩展并筛选候选,但没有独立、可开关的 shape 专用 supplement 表。 否 中 余坚峰
NVGEMM 交换 A/B 候选 为 M << N 的解码 GEMM 增加交换 A/B、计算转置输出的 NVGEMM 候选,以改善 NVIDIA tile 利用率。 nvgemm_swap_ab CATLASS 等价能力未支持。CATLASS 能表达行/列主序,但没有显式 A/B swap 候选及转置输出路径。 否 中 余坚峰
NPU Launcher 与编译执行 静态 Launcher 严格校验 Static Launcher严格模式;后者是前者面向多Triton后端的别名。当Kernel不满足静态启动条件时禁止静默回退,用于暴露未覆盖的ABI、Hook、设备或元数据场景。本身不提供启动能力,依赖Static Launcher主功能。 未接入:strict_static_cuda_launcher / strict_static_triton_launcher 未支持:triton_experimental 没有 NPU Static Launcher,且未消费 strict_static_cuda_launcher/strict_static_triton_launcher。 默认关闭;仅在无法静态启动时启用严格报错 中 罗超 0.10–0.20 人月
Triton 快速 Launcher 在Static Launcher之上使用预绑定C++/vectorcall快速入口,减少Python参数解析、Tensor data_ptr提取、指针校验和重复上下文查询,主要优化大量短Kernel的Host下发开销。 无上游同名开关;自动探测 runner.fast_launch;TRITON_FAST_PTR(可选) 部分支持:后端会自动优先调用 Triton Ascend 的 runner.fast_launch,并在 autotune 收敛后将 run 重绑定为直达 launcher 的闭包;但未接入上游 use_fast_triton_launcher,也不是基于可序列化 Static Launcher 的 Planned Fast Launch。 默认开启;仅在兼容的 Triton Launcher 路径生效 高 罗超 2 人月
Launcher 元数据标准化 优先读取Triton binary提供的版本化launch_metadata_schema,稳定获得入口名、num_warps、shared memory等启动信息,避免AOTI保存路径依赖CompiledKernel内部字段和hasattr探测。它是AOTI及跨Triton版本兼容增强项,不是NPU Static Launcher或可序列化npubin的硬前置。 未接入:use_launch_metadata_schema 未支持:仍读取 binary.packed_metadata、binary.metadata、binary.function 等内部属性,未消费 launch_metadata_schema。 默认开启;失败时回退旧 metadata 探测 中 罗超 0.25–0.50 人月(含Triton Ascend协同、版本校验和兼容回退)
Triton 静态 Launcher 启用静态Triton Kernel启动;后者是前者面向多Triton后端的别名。该能力将npubin及启动元数据收敛为与Triton运行对象解耦的Kernel描述,由预编译NPU Runtime入口直接加载和启动,也是FXGraphCache跨进程恢复静态Autotuner的基础。 未接入:use_static_cuda_launcher / use_static_triton_launcher 未支持:仍调用 binary._init_handles() 并持有 binary/function/runner,未实现独立可序列化 NPU Static Launcher。 OSS 默认开启;内部环境按灰度或环境变量控制 中 罗超 2 人月
Inductor 编译区域运行时封装 使用inductor_compiled_code高阶算子包装整个Inductor编译区域,使DebugMode、Selective Activation Checkpointing及其他TorchDispatchMode能够识别和处理编译区域;与单Kernel Launcher优化正交。 wrap_inductor_compiled_regions 支持(公共能力):PyTorch CompiledFxGraph 公共层会按配置包装当前 callable;triton_experimental 未覆盖该流程,但缺少 NPU 专项回归。 默认关闭 中 罗超 0.25–0.50 人月
NPU C++ Wrapper 使用C++ Host Wrapper替代Python Wrapper,直接组织内存、调用ATen/CATLASS/Triton Kernel并管理AOTI调用,是AOT部署和降低Python开销的重要执行路径。 cpp_wrapper(triton_experimental 未注册 cpp_wrapper_codegen) 未支持:triton_experimental 只注册 NPUWrapperCodeGen,没有注册 cpp_wrapper_codegen;cpp_wrapper=True 无对应 NPU C++ Wrapper。 默认关闭;AOTI 等场景可显式开启 高 罗超 1.5人月
C++ Wrapper 分离构建 控制C++ Wrapper入口代码与Kernel代码分开编译,以降低入口部分重复编译成本;可能增加调用或链接开销,需要基于真实模型权衡。 cpp_wrapper;cpp_wrapper_build_separate 未支持:基础 C++ Wrapper 未接入,cpp_wrapper_build_separate 无法生效。 默认关闭;依赖 cpp_wrapper 中 罗超 0.25–0.50 人月(含性能评测)
用户自定义 Triton Kernel 静态启动 允许用户自定义Triton Kernel也进入Static Launcher;需要处理任意参数签名、constexpr、autotune、Hook及用户Kernel元数据兼容。 use_static_cuda_launcher;static_launch_user_defined_triton_kernels(均未接入) 未支持:依赖 Static Launcher,当前用户自定义 Triton Kernel 仍走动态 Launcher。 默认关闭;依赖 Static Launcher 中 罗超 0.50–1.00 人月(不含基础Static Launcher)
NPU Graph Tree 待反向传播缓存张量生命周期保护 让Graph Tree cached tensor的存活判断同时观察Python引用计数、TensorImpl _use_count和grad_fn;识别由autograd SavedVariable在C++层持有的pending-backward activation,并在清理陈旧grad_fn后重新扫描整条路径,防止后续recording复用仍被backward依赖的内存。 triton.cudagraphs;triton.cudagraph_trees 未支持:缓存输出生命周期只检查 sys.getrefcount()==2,没有结合 Tensor._use_count() 识别 C++ SavedVariable 对待反向传播张量的持有。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.50–0.75 人月(含多组训练数值与生命周期回归)
Graph Tree Python 多线程安全 为每个Python线程延迟初始化Graph Tree TLS和compiled function,并使用process-wide capture lock串行化manager初始化、私有池warmup和Graph capture,避免不同线程的同步或allocator pool切换破坏其他线程的capture。 triton.cudagraphs;triton.cudagraph_trees 部分支持:已有 TLS、容器锁和每设备 manager 锁;但 warmup/capture/record 没有进程级全局 capture 锁,不能视为完整 Python 多线程安全。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.30–0.50 人月(含多线程与多设备压力测试)
捕获流外部对象同步 在Graph Tree warmup和capture期间,把Dynamo external-object registry中的CURRENT_STREAM_INDEX更新为真实capture stream,使custom op以及Event record/wait等逻辑使用正确stream。 triton.cudagraphs;triton.cudagraph_trees 未支持:捕获或回放切换 NPU stream 时,没有同步 Dynamo external-object registry 中的当前流对象。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.20–0.35 人月
Graph Tree 跨迭代输出克隆 支持cudagraph_trees_generation_cloning=user_visible;Graph Tree切换generation前克隆仍被用户持有的输出storage,重定向相关Tensor/view/alias并清理旧cached tensor引用,避免新generation覆盖旧输出。 triton.cudagraphs;triton.cudagraph_trees;triton.cudagraph_trees_generation_cloning 未支持:接口虽然接收 user_visible_output_idxs,但源码明确忽略,没有跨 generation 输出 storage 克隆和引用重定向。 默认关闭(None);设为 user_visible 后启用 中 罗超 0.75–1.25 人月
Graph Tree 预热延长控制 允许函数在Graph Tree同步warmup期间调用cudagraph_mark_warmup_incomplete,撤销当前function的warmed-up标记,使需要多轮初始化、autotune或lazy setup的函数继续warmup而不是过早capture。 triton.cudagraphs;triton.cudagraph_trees;API:torch.compiler.cudagraph_mark_warmup_incomplete() 未支持:没有 NPU 对应的 cudagraph_mark_warmup_incomplete API、active warmup 状态或再次预热控制。 按需手动调用 API;仅在 Graph Tree warmup 阶段生效 中 罗超 0.15–0.25 人月
不透明对象输入支持 允许DeviceMesh、ProcessGroup和CustomClassBase等引用类型对象作为Graph Tree opaque/static输入;将其排除出Tensor data_ptr、copy和动态shape处理,同时保留对象身份供compiled callable使用。 triton.cudagraphs;triton.cudagraph_trees 未支持:Graph Tree recording input 的非 Tensor 输入只允许 int,不支持 CustomClass 或其他 opaque object。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 中 罗超 0.25–0.40 人月
随机数生成器输入支持 允许torch.Generator作为Graph Tree非Tensor输入,支持torch.compile下RNG相关逻辑和selective activation checkpointing场景。 triton.cudagraphs;triton.cudagraph_trees 未支持:非 Tensor 输入只允许 int,torch.Generator 尚未进入 Graph Tree recording/replay 链路。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 中 罗超 0.30–0.50 人月
自重叠输入安全拷贝 当去除expanded维度后目标Tensor仍存在internal overlap时,使用storage级strided copy fallback;普通输入继续使用foreach批量copy,覆盖复杂as_strided和self-overlapping输入。 triton.cudagraphs;triton.cudagraph_trees 未支持:非静态 Tensor 输入统一使用 torch.foreach_copy,没有 internal-overlap 检查和 storage-copy 回退。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.25–0.40 人月
异常重录次数限制 区分预期的参数地址变化和真正异常的Graph invariant mismatch;StaticInputIdxMismatch允许重新record但不计入cudagraph_unexpected_rerecord_limit,其他不匹配计数并在超限后回退eager。 triton.cudagraphs;triton.cudagraph_trees;triton.cudagraph_unexpected_rerecord_limit 未支持:inline_inbuilt_nn_modules=True 时 exceed_rerecord_limit() 直接返回 False;该配置在当前 PyTorch 恒为 True,因此重录限制实际失效。 默认启用限制机制;默认阈值 128 高 罗超 0.15–0.25 人月
无 Kernel 图捕获跳过 识别不包含设备Kernel的Inductor分区,不创建和replay实际CUDAGraph,但仍通过Graph Tree私有内存池完成输出分配和生命周期管理,避免无意义或非法capture。 triton.cudagraphs;triton.cudagraph_trees;kernel_free_cudagraph(内部按图判定) 未支持:kernel_free_cudagraph 参数仅为签名兼容而接收,源码明确忽略,仍会进入 NPUGraph capture/replay。 自动按图判定;无用户级独立开关 高 罗超 0.30–0.50 人月
图捕获尺寸范围控制 通过cudagraph_capture_sizes配置动态shape capture allowlist,只为指定int key或shape tuple建立Graph Tree节点,其他动态尺寸走非capture路径,控制图数量和私有池增长。 triton.cudagraphs;triton.cudagraph_trees;triton.cudagraph_capture_sizes 未支持:没有读取 triton.cudagraph_capture_sizes,不能按指定动态尺寸约束 Graph Tree 录制。 机制已启用;默认 None,表示不限制 capture shape 中 罗超 0.10–0.20 人月
弱引用与堆栈信息容错清理 Graph Tree清理路径发现tensor_weakrefs与stack_traces长度不一致时记录warning,并以zip安全处理已有配对项,避免诊断元数据不一致导致二次执行异常。 triton.cudagraphs;triton.cudagraph_trees 未支持:tensor_weakrefs 与 stack_traces 长度不一致时直接抛 RuntimeError,没有 warning 加 zip 的容错清理。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.05–0.10 人月
梯度累积覆盖诊断 区分普通Graph输出覆盖和backward梯度Tensor覆盖;针对梯度累积给出eager warmup、预分配稳定grad buffer或每次backward前清空grad等明确修复建议。 triton.cudagraphs;triton.cudagraph_trees 未支持:只有通用“NPUGraph 输出被覆盖”错误,没有根据 BACKWARD 模式给出梯度累积专用诊断。 随 CUDA Graph Trees 自动生效;基础开关默认关闭,reduce-overhead 模式开启 高 罗超 0.05–0.15 人月
图捕获编译标识与耗时追踪 把CompileId和FORWARD/BACKWARD/INFERENCE模式贯通到Graph Tree,使用带编译上下文的dynamo_timed记录warmup、record和replay相关阶段,便于把耗时关联到具体编译实例。 triton.cudagraphs;triton.cudagraph_trees(compile_id 自动传递) 部分支持:已有 npugraphify、run_eager 和 record_function 的 dynamo_timed,也保存 FORWARD/BACKWARD/INFERENCE 模式;但未传递和记录 CompileId。 随 CUDA Graph Trees 自动记录 timing/compile_id 中 罗超 0.15–0.25 人月
图录制生命周期回调 Graph Tree开始实际recording时安装CallbackTrigger.CUDAGRAPH_RECORDING,并携带CompileId,使编译callback、Profiler和外部观测工具准确感知capture阶段。 triton.cudagraphs;triton.cudagraph_trees;torch._dynamo.callback_handler 未支持:record_function() 没有安装 CallbackTrigger.CUDAGRAPH_RECORDING 生命周期回调。 记录阶段自动触发;只有注册 callback 后才产生外部效果 中 罗超 0.10–0.20 人月(依赖compile_id接入)
Graph Tree 结构化日志 为Graph Tree日志增加函数名、function ID、输入shape/stride、warmup/record/replay路径、generation和mode等结构化上下文,减少仅凭Graph ID难以定位具体compiled callable的问题。 triton.cudagraphs;triton.cudagraph_trees;TORCH_LOGS="+cudagraphs" 部分支持:已有 cudagraphs artifact logger 和状态日志;但缺少统一的 compile_id、函数名、编译模式和格式化输入字段。 结构化日志代码默认存在;需开启 cudagraphs 日志才能看到输出 中 罗超 0.15–0.25 人月


特性入口 特性层级L0 特性层级L1 特性层级L2 特性类型 功能说明 来源 NPU支持情况
torch.compile torchinductor 数值/正确性 alignment_asserts 数值/正确性 alignment_asserts 配置开关 config: torch._inductor.config.alignment_asserts = ( os.environ.get("TORCHINDUCTOR_ALIGNMENT_ASSERTS", "0" if is_fbcode() else "1") == "1" ) [env: TORCHINDUCTOR_ALIGNMENT_ASSERTS] 不支持
torch.compile torchinductor 数值/正确性 assert_indirect_indexing 数值/正确性 assert_indirect_indexing 配置开关 config: torch._inductor.config.assert_indirect_indexing = True 不支持
torch.compile torchinductor 数值/正确性 asserts 与 numerics 校验 数值/正确性 size/nan/scalar/alignment 断言。 文档: config.py 不支持
torch.compile torchinductor 数值/正确性 cutlass.use_fast_math 数值/正确性 Whether to use fast math. config: torch._inductor.config.cutlass.use_fast_math = False 不支持
torch.compile torchinductor 数值/正确性 deterministic 数值/正确性 确定性执行。 文档: config.py 不支持
torch.compile torchinductor 数值/正确性 do_not_emit_runtime_assertions 数值/正确性 do_not_emit_runtime_assertions 配置开关 config: torch._inductor.config.do_not_emit_runtime_assertions = False 不支持
torch.compile torchinductor 数值/正确性 eager_numerics.disable_ftz 数值/正确性 eager_numerics.disable_ftz 配置开关 config: torch._inductor.config.eager_numerics.disable_ftz = False 不支持
torch.compile torchinductor 数值/正确性 eager_numerics.division_rounding 数值/正确性 x / y in Triton is lowered to div.full which is approx PyTorch eager uses the equivalent of Triton's div_rn, which can come at a performance penalty config: torch._inductor.config.eager_numerics.division_rounding = ( os.environ.get("TORCHINDUCTOR_EMULATE_DIVISION_ROUNDING", "0") == "1" ) [env: TORCHINDUCTOR_EMULATE_DIVISION_ROUNDING] 不支持
torch.compile torchinductor 数值/正确性 eager_numerics.use_pytorch_libdevice 数值/正确性 Use the CUDA toolkit's libdevice instead of Triton's bundled version. Triton bundles its own libdevice.10.bc which may use different polynomial approximations than the installed CUDA toolkit, causing ~1 ULP differences in transcendental functions such as pow and erf. The erf difference is particularly visible in explicit GELU kernels (0.5 * x * (1 + erf(x * sqrt(0.5)))) where a 1 ULP change in erf output can flip the result of a subsequent ceil(log2(...)) and produce a different uint8 encoded value (see gh-178045). This can be enabled directly; Inductor also enables it while emulate_precision_casts is active. config: torch._inductor.config.eager_numerics.use_pytorch_libdevice = False 不支持
torch.compile torchinductor 数值/正确性 fallback_random 数值/正确性 回退 eager RNG 保证随机数一致。 文档: torch.compiler_faq.md 不支持
torch.compile torchinductor 数值/正确性 halide.asserts 数值/正确性 Controls
no_assertsflag passed to Halide target (warning: can false positive) config: torch._inductor.config.halide.asserts = False 不支持torch.compile torchinductor 数值/正确性 nan_asserts 数值/正确性 nan_asserts 配置开关 config: torch._inductor.config.nan_asserts = os.environ.get("TORCHINDUCTOR_NAN_ASSERTS") == "1" [env: TORCHINDUCTOR_NAN_ASSERTS] 不支持
torch.compile torchinductor 数值/正确性 numerics 数值/正确性 numerics 配置开关 config: torch._inductor.config.numerics = os.environ.get( "TORCHINDUCTOR_NUMERICS", "default" ) # type: ignore[assignment] [env: TORCHINDUCTOR_NUMERICS] 不支持
torch.compile torchinductor 数值/正确性 rocm.use_fast_math 数值/正确性 Flag to add `-ffast-math`` to compile flags config: torch._inductor.config.rocm.use_fast_math = True 不支持
torch.compile torchinductor 数值/正确性 runtime_triton_nan_asserts 数值/正确性 runtime_triton_nan_asserts 配置开关 config: torch._inductor.config.runtime_triton_nan_asserts = ( os.environ.get("TORCHINDUCTOR_RUNTIME_TRITON_NAN_ASSERTS") == "1" ) [env: TORCHINDUCTOR_RUNTIME_TRITON_NAN_ASSERTS] 不支持
torch.compile torchinductor 数值/正确性 scalar_asserts 数值/正确性 scalar_asserts 配置开关 config: torch._inductor.config.scalar_asserts = os.environ.get("TORCHINDUCTOR_SCALAR_ASSERTS", "1") == "1" [env: TORCHINDUCTOR_SCALAR_ASSERTS] 不支持
torch.compile torchinductor 数值/正确性 size_asserts 数值/正确性 size_asserts 配置开关 config: torch._inductor.config.size_asserts = os.environ.get("TORCHINDUCTOR_SIZE_ASSERTS", "1") == "1" [env: TORCHINDUCTOR_SIZE_ASSERTS] 不支持
torch.compile torchinductor 数值/正确性 strict_signed_zero 数值/正确性 strict_signed_zero 配置开关 config: torch._inductor.config.strict_signed_zero = False 不支持
torch.compile torchinductor 数值/正确性 use_fast_math 数值/正确性 启用快速数学指令。 文档: config.py 不支持
torch.compile torchinductor 数值/正确性 write_are_deterministic_algorithms_enabled 数值/正确性 write_are_deterministic_algorithms_enabled 配置开关 config: torch._inductor.config.write_are_deterministic_algorithms_enabled = ( os.getenv("TORCHINDUCTOR_WRITE_ARE_DETERMINISTIC_ALGORITHMS_ENABLED", "1") == "1" ) 不支持
torch.compile torchinductor 融合规则 aggressive_fusion 融合规则 aggressive_fusion 配置开关 config: torch._inductor.config.aggressive_fusion = False 不支持
torch.compile torchinductor 融合规则 batch_fusion 融合规则 batch_fusion 配置开关 config: torch._inductor.config.batch_fusion = True 不支持
torch.compile torchinductor 融合规则 group / batch fusion 融合规则 小算子分组/批量融合。 文档: config.py 不支持
torch.compile torchinductor 融合规则 group_fusion 融合规则 group_fusion 配置开关 config: torch._inductor.config.group_fusion = False 不支持
torch.compile torchinductor 融合规则 loop_index_inversion_in_fusion 融合规则 loop_index_inversion_in_fusion 配置开关 config: torch._inductor.config.loop_index_inversion_in_fusion = True 不支持
torch.compile torchinductor 融合规则 loop_ordering_after_fusion 融合规则 loop_ordering_after_fusion 配置开关 config: torch._inductor.config.loop_ordering_after_fusion = ( os.environ.get( "TORCHINDUCTOR_LOOP_ORDERING_AFTER_FUSION", "0" if is_fbcode() else "1" ) == "1" ) [env: TORCHINDUCTOR_LOOP_ORDERING_AFTER_FUSION] 不支持
torch.compile torchinductor 融合规则 loop_reindexing_after_fusion 融合规则 loop_reindexing_after_fusion 配置开关 config: torch._inductor.config.loop_reindexing_after_fusion = ( os.environ.get("TORCHINDUCTOR_LOOP_REINDEXING_AFTER_FUSION", "1") == "1" ) [env: TORCHINDUCTOR_LOOP_REINDEXING_AFTER_FUSION] 不支持
torch.compile torchinductor 融合规则 max_fusion_buffer_group_pairwise_attempts 融合规则 max_fusion_buffer_group_pairwise_attempts 配置开关 config: torch._inductor.config.max_fusion_buffer_group_pairwise_attempts = 64 不支持
torch.compile torchinductor 融合规则 max_fusion_size 融合规则 max_fusion_size 配置开关 config: torch._inductor.config.max_fusion_size = 64 不支持
torch.compile torchinductor 融合规则 max_fusion_unique_io_buffers 融合规则 max_fusion_unique_io_buffers 配置开关 config: torch._inductor.config.max_fusion_unique_io_buffers = None 不支持
torch.compile torchinductor 融合规则 score_fusion_memory_threshold 融合规则 score_fusion_memory_threshold 配置开关 config: torch._inductor.config.score_fusion_memory_threshold = 10 不支持
torch.compile torchinductor 融合规则 split reductions 融合规则 拆分 reduction 改善并行度。 文档: config.py 不支持
torch.compile torchinductor 融合规则 split_reductions 融合规则 split_reductions 配置开关 config: torch._inductor.config.split_reductions = os.getenv("TORCHINDUCTOR_SPLIT_REDUCTIONS", "1") == "1" 不支持
torch.compile torchinductor 融合规则 triton.tiling_prevents_pointwise_fusion 融合规则 should we stop a fusion to allow better tiling? config: torch._inductor.config.triton.tiling_prevents_pointwise_fusion = True 不支持
torch.compile torchinductor 融合规则 triton.tiling_prevents_reduction_fusion 融合规则 triton.tiling_prevents_reduction_fusion 配置开关 config: torch._inductor.config.triton.tiling_prevents_reduction_fusion = True 不支持
torch.compile torchinductor 融合规则 垂直/水平融合 融合规则 顺序算子垂直融合、批量 GEMM 水平融合。 文档: torch.compiler_faq.md 不支持
torch.compile torchinductor 融合规则 _realize_acc_reads_threshold_default 融合规则 _realize_acc_reads_threshold_default 配置开关 config: torch._inductor.config._realize_acc_reads_threshold_default = 8 不支持
torch.compile torchinductor 融合规则 _realize_opcount_threshold_default 融合规则 _realize_opcount_threshold_default 配置开关 config: torch._inductor.config._realize_opcount_threshold_default = 30 不支持
torch.compile torchinductor 数值/正确性 assume_32bit_indexing 数值/正确性 assume_32bit_indexing 配置开关 config: torch._inductor.config.assume_32bit_indexing = False 不支持
torch.compile torchinductor 数值/正确性 assume_unaligned_fallback_output 数值/正确性 assume_unaligned_fallback_output 配置开关 config: torch._inductor.config.assume_unaligned_fallback_output = ( os.environ.get("TORCHINDUCTOR_ASSUME_UNALIGNED_FALLBACK_OUTPUT") == "1" ) [env: TORCHINDUCTOR_ASSUME_UNALIGNED_FALLBACK_OUTPUT] 不支持
torch.compile torchinductor 融合规则 realize_acc_reads_size_threshold 融合规则 realize_acc_reads_size_threshold 配置开关 config: torch._inductor.config.realize_acc_reads_size_threshold = ( None # TODO(xuanzh): harden this to make it non optional ) 不支持
torch.compile torchinductor 融合规则 realize_acc_reads_threshold 融合规则 realize_acc_reads_threshold 配置开关 config: torch._inductor.config.realize_acc_reads_threshold = None 不支持
torch.compile torchinductor 融合规则 realize_cpu_acc_reads_threshold 融合规则 realize_cpu_acc_reads_threshold 配置开关 config: torch._inductor.config.realize_cpu_acc_reads_threshold = 12 不支持
torch.compile torchinductor 融合规则 realize_cpu_opcount_threshold 融合规则 realize_cpu_opcount_threshold 配置开关 config: torch._inductor.config.realize_cpu_opcount_threshold = 50 不支持
torch.compile torchinductor 融合规则 realize_opcount_threshold 融合规则 realize_opcount_threshold 配置开关 config: torch._inductor.config.realize_opcount_threshold = None 不支持
torch.compile torchinductor 融合规则 realize_opusers_threshold 融合规则 realize_opusers_threshold 配置开关 config: torch._inductor.config.realize_opusers_threshold = 5 不支持
torch.compile torchinductor 融合规则 realize_reads_threshold 融合规则 realize_reads_threshold 配置开关 config: torch._inductor.config.realize_reads_threshold = 4 不支持
torch.compile torchinductor 融合规则 selective decomposition 融合规则 选择性分解算子。 文档: config.py 不支持
torch.compile torchinductor 数值/正确性 _use_fp64_for_unbacked_floats 数值/正确性 _use_fp64_for_unbacked_floats 配置开关 config: torch._inductor.config._use_fp64_for_unbacked_floats = not is_fbcode() 不支持
torch.compile torchinductor 数值/正确性 align_random_eager 数值/正确性 align_random_eager 配置开关 config: torch._inductor.config.align_random_eager = False 不支持
torch.compile torchinductor 数值/正确性 assume_aligned_inputs 数值/正确性 assume_aligned_inputs 配置开关 config: torch._inductor.config.assume_aligned_inputs = False 不支持
torch.compile torchinductor 数值/正确性 bw_outputs_user_visible 数值/正确性 bw_outputs_user_visible 配置开关 config: torch._inductor.config.bw_outputs_user_visible = True 不支持
torch.compile torchinductor 数值/正确性 compute_all_bounds 数值/正确性 compute_all_bounds 配置开关 config: torch._inductor.config.compute_all_bounds = False 不支持
torch.compile torchinductor 数值/正确性 emulate_precision_casts 数值/正确性 emulate_precision_casts 配置开关 config: torch._inductor.config.emulate_precision_casts = ( os.environ.get("TORCHINDUCTOR_EMULATE_PRECISION_CASTS", "0") == "1" ) [env: TORCHINDUCTOR_EMULATE_PRECISION_CASTS] 不支持
torch.compile torchinductor 数值/正确性 emulate_precision_casts_on_saved_tensors 数值/正确性 emulate_precision_casts_on_saved_tensors 配置开关 config: torch._inductor.config.emulate_precision_casts_on_saved_tensors = ( os.environ.get("TORCHINDUCTOR_EMULATE_PRECISION_CASTS_ON_SAVED_TENSORS", "1") == "1" ) [env: TORCHINDUCTOR_EMULATE_PRECISION_CASTS_ON_SAVED_TENSORS] 不支持
torch.compile torchinductor 融合规则 expand_dimension_for_pointwise_nodes 融合规则 expand_dimension_for_pointwise_nodes 配置开关 config: torch._inductor.config.expand_dimension_for_pointwise_nodes = False 不支持
torch.compile torchinductor autotune inductor_choices_class autotune inductor_choices_class 配置开关 config: torch._inductor.config.inductor_choices_class = None 不支持
torch.compile torchinductor 数值/正确性 keep_addmm_fused_for_half_dtypes 数值/正确性 keep_addmm_fused_for_half_dtypes 配置开关 config: torch._inductor.config.keep_addmm_fused_for_half_dtypes = True 不支持
torch.compile torchinductor 融合规则 max_complex_pointwise_cat_inputs 融合规则 max_complex_pointwise_cat_inputs 配置开关 config: torch._inductor.config.max_complex_pointwise_cat_inputs = 8 不支持
torch.compile torchinductor 融合规则 max_pointwise_cat_inputs 融合规则 max_pointwise_cat_inputs 配置开关 config: torch._inductor.config.max_pointwise_cat_inputs = 8 不支持
torch.compile torchinductor 融合规则 min_num_split 融合规则 min_num_split 配置开关 config: torch._inductor.config.min_num_split = int(os.environ.get("TORCHINDUCTOR_MIN_NUM_SPLIT", 0)) [env: TORCHINDUCTOR_MIN_NUM_SPLIT] 不支持
torch.compile torchinductor 融合规则 min_overlap_ratio 融合规则 min_overlap_ratio 配置开关 config: torch._inductor.config.min_overlap_ratio = 1.1 不支持
torch.compile torchinductor autotune multi_kernel_hints autotune multi_kernel_hints 配置开关 config: torch._inductor.config.multi_kernel_hints = [] 不支持
torch.compile torchinductor 融合规则 pick_loop_orders 融合规则 pick_loop_orders 配置开关 config: torch._inductor.config.pick_loop_orders = True 不支持
torch.compile torchinductor 融合规则 small_memory_access_threshold 融合规则 small_memory_access_threshold 配置开关 config: torch._inductor.config.small_memory_access_threshold = 16777216 不支持
torch.compile torchinductor 数值/正确性 static_weight_shapes 数值/正确性 static_weight_shapes 配置开关 config: torch._inductor.config.static_weight_shapes = True 不支持
torch.compile torchinductor 数值/正确性 batch_invariant 数值/正确性 batch_invariant 配置开关 config: torch._inductor.config.batch_invariant = os.getenv("TORCHINDUCTOR_BATCH_INVARIANT") == "1" 不支持
torch.compile torchdynamo 数值/正确性 enable_complex_wrapper 数值/正确性 实验性 complex 张量编译,分解为实部/虚部。 文档: torch.compiler_complex_number_support.md 不支持
torch.compile torchinductor 数值/正确性 triton.codegen_upcast_to_fp32 数值/正确性 Whether to upcast float16 / bfloat16 to float32 in triton codegen (Experimental) config: torch._inductor.config.triton.codegen_upcast_to_fp32 = True 不支持
torch.compile torchinductor autotune autoheuristic_collect.mixed_mm autotune autoheuristic_collect.mixed_mm 配置开关 config: torch._inductor.config.autoheuristic_collect.mixed_mm = "mixed_mm" in _parse_autoheuristic_collect_env() 不支持
torch.compile torchinductor autotune autoheuristic_collect.pad_mm autotune autoheuristic_collect.pad_mm 配置开关 config: torch._inductor.config.autoheuristic_collect.pad_mm = "pad_mm" in _parse_autoheuristic_collect_env() 不支持
torch.compile torchinductor autotune autoheuristic_log_path autotune autoheuristic_log_path 配置开关 config: torch._inductor.config.autoheuristic_log_path = os.environ.get( "TORCHINDUCTOR_AUTOHEURISTIC_LOG_PATH", "DEFAULT" ) [env: TORCHINDUCTOR_AUTOHEURISTIC_LOG_PATH] 不支持
torch.compile torchinductor autotune autoheuristic_use.mixed_mm autotune autoheuristic_use.mixed_mm 配置开关 config: torch._inductor.config.autoheuristic_use.mixed_mm = True if "mixed_mm" in _parse_autoheuristic_use_env() else None 不支持
torch.compile torchinductor autotune autoheuristic_use.pad_mm autotune autoheuristic_use.pad_mm 配置开关 config: torch._inductor.config.autoheuristic_use.pad_mm = True if "pad_mm" in _parse_autoheuristic_use_env() else None 不支持
torch.compile torchinductor autotune autotune_cudagraph_benchmarking autotune autotune_cudagraph_benchmarking 配置开关 config: torch._inductor.config.autotune_cudagraph_benchmarking = ( os.environ.get("TORCHINDUCTOR_AUTOTUNE_CUDAGRAPH_BENCHMARKING") == "1" ) [env: TORCHINDUCTOR_AUTOTUNE_CUDAGRAPH_BENCHMARKING] 不支持
torch.compile torchinductor autotune autotune_fallback_to_aten autotune autotune_fallback_to_aten 配置开关 config: torch._inductor.config.autotune_fallback_to_aten = False 不支持
torch.compile torchinductor autotune autotune_in_subproc autotune autotune_in_subproc 配置开关 config: torch._inductor.config.autotune_in_subproc = os.environ.get("TORCHINDUCTOR_AUTOTUNE_IN_SUBPROC") == "1" [env: TORCHINDUCTOR_AUTOTUNE_IN_SUBPROC] 不支持
torch.compile torchinductor autotune autotune_multi_device autotune autotune_multi_device 配置开关 config: torch._inductor.config.autotune_multi_device = os.environ.get("TORCHINDUCTOR_AUTOTUNE_MULTI_DEVICE") == "1" [env: TORCHINDUCTOR_AUTOTUNE_MULTI_DEVICE] 不支持
torch.compile torchinductor autotune autotune_num_choices_displayed autotune autotune_num_choices_displayed 配置开关 config: torch._inductor.config.autotune_num_choices_displayed = _autotune_num_choices_displayed_default() 不支持
torch.compile torchinductor autotune benchmark harness / kernel benchmark autotune 生成内核基准并报告耗时/带宽。 文档: torch.compiler_inductor_profiling.md 不支持
torch.compile torchinductor autotune benchmark_combo_kernel autotune benchmark_combo_kernel 配置开关 config: torch._inductor.config.benchmark_combo_kernel = False 不支持
torch.compile torchinductor autotune benchmark_epilogue_fusion autotune benchmark_epilogue_fusion 配置开关 config: torch._inductor.config.benchmark_epilogue_fusion = ( os.environ.get("TORCHINDUCTOR_BENCHMARK_EPILOGUE_FUSION", "1") == "1" ) [env: TORCHINDUCTOR_BENCHMARK_EPILOGUE_FUSION] 不支持
torch.compile torchinductor autotune benchmark_fusion autotune benchmark_fusion 配置开关 config: torch._inductor.config.benchmark_fusion = os.environ.get("TORCHINDUCTOR_BENCHMARK_FUSION") == "1" [env: TORCHINDUCTOR_BENCHMARK_FUSION] 不支持
torch.compile torchinductor autotune benchmark_harness autotune benchmark_harness 配置开关 config: torch._inductor.config.benchmark_harness = True 不支持
torch.compile torchinductor autotune benchmark_kernel autotune benchmark_kernel 配置开关 config: torch._inductor.config.benchmark_kernel = os.environ.get("TORCHINDUCTOR_BENCHMARK_KERNEL", "0") == "1" [env: TORCHINDUCTOR_BENCHMARK_KERNEL] 不支持
torch.compile torchinductor autotune collective_benchmark_nruns autotune collective_benchmark_nruns 配置开关 config: torch._inductor.config.collective_benchmark_nruns = int( os.environ.get("TORCHINDUCTOR_COLLECTIVE_BENCHMARK_NRUNS", "50") ) [env: TORCHINDUCTOR_COLLECTIVE_BENCHMARK_NRUNS] 不支持
torch.compile torchinductor autotune collective_benchmark_timeout autotune collective_benchmark_timeout 配置开关 config: torch._inductor.config.collective_benchmark_timeout = float( os.environ.get("TORCHINDUCTOR_COLLECTIVE_BENCHMARK_TIMEOUT", "30") ) [env: TORCHINDUCTOR_COLLECTIVE_BENCHMARK_TIMEOUT] 不支持
torch.compile torchinductor autotune combo_kernel_autotune_grouping autotune combo_kernel_autotune_grouping 配置开关 config: torch._inductor.config.combo_kernel_autotune_grouping = True 不支持
torch.compile torchinductor autotune combo_kernel_compile_time_autotune autotune combo_kernel_compile_time_autotune 配置开关 config: torch._inductor.config.combo_kernel_compile_time_autotune = Config( justknob="pytorch/inductor:combo_kernel_compile_time_autotune", env_name_force="TORCHINDUCTOR_COMBO_KERNEL_COMPILE_TIME_AUTOTUNE", default=False, ) 不支持
torch.compile torchinductor autotune combo_kernels_autotune autotune combo_kernels_autotune 配置开关 config: torch._inductor.config.combo_kernels_autotune = 1 不支持
torch.compile torchinductor autotune coordinate descent tuning autotune 坐标下降法搜索内核配置。 文档: config.py 不支持
torch.compile torchinductor autotune coordinate_descent_check_all_directions autotune coordinate_descent_check_all_directions 配置开关 config: torch._inductor.config.coordinate_descent_check_all_directions = ( os.environ.get("TORCHINDUCTOR_COORDINATE_DESCENT_CHECK_ALL_DIRECTIONS") == "1" ) [env: TORCHINDUCTOR_COORDINATE_DESCENT_CHECK_ALL_DIRECTIONS] 不支持
torch.compile torchinductor autotune coordinate_descent_search_radius autotune coordinate_descent_search_radius 配置开关 config: torch._inductor.config.coordinate_descent_search_radius = int( os.environ.get("TORCHINDUCTOR_COORDINATE_DESCENT_RADIUS", "1") ) [env: TORCHINDUCTOR_COORDINATE_DESCENT_RADIUS] 不支持
torch.compile torchinductor autotune coordinate_descent_tuning autotune coordinate_descent_tuning 配置开关 config: torch._inductor.config.coordinate_descent_tuning = ( os.environ.get("TORCHINDUCTOR_COORDINATE_DESCENT_TUNING") == "1" ) [env: TORCHINDUCTOR_COORDINATE_DESCENT_TUNING] 不支持
torch.compile torchinductor autotune distributed_max_autotune_gemm autotune distributed_max_autotune_gemm 配置开关 config: torch._inductor.config.distributed_max_autotune_gemm = ( os.environ.get("TORCHINDUCTOR_DISTRIBUTED_MAX_AUTOTUNE_GEMM") == "1" ) [env: TORCHINDUCTOR_DISTRIBUTED_MAX_AUTOTUNE_GEMM] 不支持
torch.compile torchinductor autotune incremental_autotune autotune incremental_autotune 配置开关 config: torch._inductor.config.incremental_autotune = get_tristate_env( "TORCHINDUCTOR_INCREMENTAL_AUTOTUNE", default=False ) 不支持
torch.compile torchinductor autotune inductor_default_autotune_rep autotune inductor_default_autotune_rep 配置开关 config: torch._inductor.config.inductor_default_autotune_rep = int( os.getenv("TORCHINDUCTOR_DEFAULT_AUTOTUNE_REP", 100) ) 不支持
torch.compile torchinductor autotune inductor_default_autotune_warmup autotune inductor_default_autotune_warmup 配置开关 config: torch._inductor.config.inductor_default_autotune_warmup = int( os.getenv("TORCHINDUCTOR_DEFAULT_AUTOTUNE_WARMUP", 25) ) 不支持
torch.compile torchinductor autotune max_autotune autotune 基准更多 Triton Configs 并选择最优。 文档: torch.compiler_inductor_profiling.md 不支持
torch.compile torchinductor autotune max_autotune_allow_flexible_layouts autotune max_autotune_allow_flexible_layouts 配置开关 config: torch._inductor.config.max_autotune_allow_flexible_layouts = False 不支持
torch.compile torchinductor autotune max_autotune_conv_backends autotune max_autotune_conv_backends 配置开关 config: torch._inductor.config.max_autotune_conv_backends = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_CONV_BACKENDS", "ATEN,TRITON" ).upper() [env: TORCHINDUCTOR_MAX_AUTOTUNE_CONV_BACKENDS] 不支持
torch.compile torchinductor autotune max_autotune_conv_bwd_input_backends autotune max_autotune_conv_bwd_input_backends 配置开关 config: torch._inductor.config.max_autotune_conv_bwd_input_backends = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_BWD_INPUT_CONV_BACKENDS", _conv_default_backends ).upper() [env: TORCHINDUCTOR_MAX_AUTOTUNE_BWD_INPUT_CONV_BACKENDS] 不支持
torch.compile torchinductor autotune max_autotune_conv_bwd_weight_backends autotune max_autotune_conv_bwd_weight_backends 配置开关 config: torch._inductor.config.max_autotune_conv_bwd_weight_backends = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_BWD_WEIGHT_CONV_BACKENDS", _conv_default_backends ).upper() [env: TORCHINDUCTOR_MAX_AUTOTUNE_BWD_WEIGHT_CONV_BACKENDS] 不支持
torch.compile torchinductor autotune max_autotune_flex_search_space autotune max_autotune_flex_search_space 配置开关 config: torch._inductor.config.max_autotune_flex_search_space = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_FLEX_SEARCH_SPACE", "DEFAULT" ).upper() # type: ignore[assignment] [env: TORCHINDUCTOR_MAX_AUTOTUNE_FLEX_SEARCH_SPACE] 不支持
torch.compile torchinductor autotune max_autotune_gemm autotune max_autotune_gemm 配置开关 config: torch._inductor.config.max_autotune_gemm = os.environ.get("TORCHINDUCTOR_MAX_AUTOTUNE_GEMM") == "1" [env: TORCHINDUCTOR_MAX_AUTOTUNE_GEMM] 不支持
torch.compile torchinductor autotune max_autotune_gemm / conv / pointwise autotune 分类充分调优 GEMM/卷积/逐点。 文档: config.py 不支持
torch.compile torchinductor autotune max_autotune_gemm_backends autotune max_autotune_gemm_backends 配置开关 config: torch._inductor.config.max_autotune_gemm_backends = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_BACKENDS", "ATEN,TRITON,CPP" ).upper() [env: TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_BACKENDS] 不支持
torch.compile torchinductor autotune max_autotune_gemm_search_space autotune max_autotune_gemm_search_space 配置开关 config: torch._inductor.config.max_autotune_gemm_search_space = os.environ.get( "TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_SEARCH_SPACE", "DEFAULT" ).upper() # type: ignore[assignment] [env: TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_SEARCH_SPACE] 不支持
torch.compile torchinductor autotune max_autotune_pointwise autotune max_autotune_pointwise 配置开关 config: torch._inductor.config.max_autotune_pointwise = os.environ.get("TORCHINDUCTOR_MAX_AUTOTUNE_POINTWISE") == "1" [env: TORCHINDUCTOR_MAX_AUTOTUNE_POINTWISE] 不支持
torch.compile torchinductor autotune max_autotune_prune_choices_based_on_shared_mem autotune max_autotune_prune_choices_based_on_shared_mem 配置开关 config: torch._inductor.config.max_autotune_prune_choices_based_on_shared_mem = ( os.environ.get("TORCHINDUCTOR_MAX_AUTOTUNE_PRUNE_CHOICES_BASED_ON_SHARED_MEM", "0") == "1" ) [env: TORCHINDUCTOR_MAX_AUTOTUNE_PRUNE_CHOICES_BASED_ON_SHARED_MEM] 不支持
torch.compile torchinductor autotune max_autotune_report_choices_stats autotune max_autotune_report_choices_stats 配置开关 config: torch._inductor.config.max_autotune_report_choices_stats = ( os.environ.get("TORCHINDUCTOR_MAX_AUTOTUNE_REPORT_CHOICES_STATS", "1") == "1" ) [env: TORCHINDUCTOR_MAX_AUTOTUNE_REPORT_CHOICES_STATS] 不支持
torch.compile torchinductor autotune max_autotune_subproc_graceful_timeout_seconds autotune max_autotune_subproc_graceful_timeout_seconds 配置开关 config: torch._inductor.config.max_autotune_subproc_graceful_timeout_seconds = 0.0 不支持
torch.compile torchinductor autotune max_autotune_subproc_result_timeout_seconds autotune max_autotune_subproc_result_timeout_seconds 配置开关 config: torch._inductor.config.max_autotune_subproc_result_timeout_seconds = 60.0 不支持
torch.compile torchinductor autotune max_autotune_subproc_terminate_timeout_seconds autotune max_autotune_subproc_terminate_timeout_seconds 配置开关 config: torch._inductor.config.max_autotune_subproc_terminate_timeout_seconds = 0.0 不支持
torch.compile torchinductor autotune max_epilogue_benchmarked_choices autotune max_epilogue_benchmarked_choices 配置开关 config: torch._inductor.config.max_epilogue_benchmarked_choices = 1 不支持
torch.compile torchinductor autotune pipeline_max_autotune_gemm autotune pipeline_max_autotune_gemm 配置开关 config: torch._inductor.config.pipeline_max_autotune_gemm = ( os.environ.get("TORCHINDUCTOR_PIPELINE_GEMM_AUTOTUNING") == "1" ) [env: TORCHINDUCTOR_PIPELINE_GEMM_AUTOTUNING] 不支持
torch.compile torchinductor autotune runtime_estimations_mms_benchmark autotune runtime_estimations_mms_benchmark 配置开关 config: torch._inductor.config.runtime_estimations_mms_benchmark = False 不支持
torch.compile torchinductor autotune triton.autotune_at_compile_time autotune Tune the generated Triton kernels at compile time instead of first time they run Setting to None means uninitialized config: torch._inductor.config.triton.autotune_at_compile_time = autotune_at_compile_time_default() 不支持
torch.compile torchinductor autotune triton.autotune_cublasLt autotune max autotune gemm with cublasLt config: torch._inductor.config.triton.autotune_cublasLt = True 不支持
torch.compile torchinductor autotune triton.autotune_pointwise autotune use triton.autotune for pointwise ops with complex layouts this should only be disabled for debugging/testing config: torch._inductor.config.triton.autotune_pointwise = True 不支持
torch.compile torchinductor autotune triton.autotune_with_sample_inputs autotune We use random tensors for autotune by default. Setting this as true will let us use inputs from sample inputs to autotune user defined triton kernels. Side effect for this option is increased memory footprint during first pass compilation. config: torch._inductor.config.triton.autotune_with_sample_inputs = False 不支持
torch.compile torchinductor autotune triton.mix_order_reduction_autotune_split_size autotune triton.mix_order_reduction_autotune_split_size 配置开关 config: torch._inductor.config.triton.mix_order_reduction_autotune_split_size = ( os.environ.get("TORCHINDUCTOR_MIX_ORDER_REDUCTION_AUTOTUNE_SPLIT_SIZE", "0") == "1" ) [env: TORCHINDUCTOR_MIX_ORDER_REDUCTION_AUTOTUNE_SPLIT_SIZE] 不支持
torch.compile torchinductor autotune unsafe_ignore_unsupported_triton_autotune_args autotune unsafe_ignore_unsupported_triton_autotune_args 配置开关 config: torch._inductor.config.unsafe_ignore_unsupported_triton_autotune_args = False 不支持
torch.compile torchinductor autotune use_experimental_benchmarker autotune use_experimental_benchmarker 配置开关 config: torch._inductor.config.use_experimental_benchmarker = Config( default=True, env_name_force="TORCHINDUCTOR_USE_EXPERIMENTAL_BENCHMARKER", justknob="pytorch/inductor:use_experimental_benchmarker", ) 不支持