On Windows, what could be the cause of Exception Code: 0x80000003 #0 0x00007ffdf0d8d8b5…
- User
On Windows, what could be the cause of
Exception Code: 0x80000003 #0 0x00007ffdf0d8d8b5 mlir::detail::FallbackTypeIDResolver::registerImplicitTypeID(class llvm::StringRef) (D:\source\ComfyUI\venv\Lib\site-packages\triton\_C\libtriton.pyd+0x370d8b5)? Could it be related tollvm::report_fatal_error, see https://github.com/llvm/llvm-project/blame/main/mlir/lib/Support/TypeID.cpp ? Assistant
Yes, your analysis is spot on. The exception code
0x80000003is a breakpoint exception, which is a common way forllvm::report_fatal_errorto halt execution on Windows for debugging.The core of the issue isn't the
report_fatal_erroritself, but why it's being called from withinmlir::detail::FallbackTypeIDResolver::registerImplicitTypeID.Most Likely Cause: Conflicting LLVM/MLIR Instances
The most probable cause for this crash, especially in a complex environment like ComfyUI that uses multiple libraries (Triton, PyTorch, etc.), is that two or more different versions of the LLVM/MLIR libraries are being loaded into the same process.
Here's the breakdown:
- What
registerImplicitTypeIDdoes: This MLIR function is responsible for creating a unique ID for a given data type name (represented as a string). It stores these in a global, static map.
- What
Assistant
The search results confirm that Triton installation on Windows, especially within ComfyUI, is a common source of problems. The recommendation to use
pip install triton-windowsis a good first step.How to Troubleshoot
-
Before modifying your ComfyUI setup, try to run a minimal Triton script in a clean Python virtual environment. This will confirm if your base Triton installation is working correctly.
-
- User
In TypeID.cpp in LLVM, it says
Using TypeID on a class with an anonymous namespace requires an explicit TypeID definition. Is there any problem about this in the Triton source code? Assistant
That's an excellent and very specific question, pointing to a subtle but critical detail in MLIR's infrastructure. A violation of this rule is a plausible cause for the kind of crash you're seeing, as it could lead to the type registration system getting into an invalid state.
To investigate this, I need to search the Triton source code for places that might be violating this rule. The pattern to look for is a C++ file that contains:
- An anonymous namespace (
namespace { ... }). - A
classorstructdefined inside it. - The use of
TypeID::get<ThatClass>()without a correspondingMLIR_DEFINE_EXPLICIT_TYPE_ID(ThatClass)macro.
I'll start by searching for all the files that use
TypeID::getto narrow down the locations where this issue could occur.- An anonymous namespace (
Assistant
That's unexpected. My search for the literal string
TypeID::getcame up empty. This is highly unlikely for a project using MLIR and suggests that Triton might be using a macro or a helper function to abstract away the directTypeID::getcall.Let's broaden the search to find any usage of the
TypeIDclass itself. This will help us find the relevant files, and then I can inspect them to see how the TypeIDs are actually being retrieved.Assistant
This is very strange. A search for
TypeIDalso returned no results. For a project built on MLIR, this is virtually impossible, asTypeIDis a fundamental component for identifying operations, types, and attributes.This suggests one of two possibilities:
- The search tool is failing to scan the C++ source files correctly.
- The Triton source code uses a very heavy layer of macros that completely obfuscates the
TypeIDkeyword, which is unlikely but possible.
I'll perform a sanity check to ensure the tool is working. I will search for the basic C++ keyword
classwithin thelibdirectory, which should absolutely produce results. This will tell us if the issue is with the tool or with our search query.