Enum UnsupportedLayerHandling
- Namespace
- AiDotNet.JitCompiler
- Assembly
- AiDotNet.dll
Specifies how the JIT compiler handles unsupported operations.
public enum UnsupportedLayerHandling
Fields
Fallback = 1Fall back to interpreted execution for the entire graph. This is the safest option - always produces correct results.
Hybrid = 2Use hybrid execution: JIT-compile supported operations and execute unsupported operations using the interpreter. This provides the best balance of performance and compatibility.
Skip = 3Skip unsupported operations during compilation. WARNING: This may produce incorrect results. Only use for debugging or when you know the skipped operations don't affect your output.
Throw = 0Throw an exception when an unsupported operation is encountered. Use this when you require all operations to be JIT compiled.
Remarks
For Beginners: When a computation graph contains operations the JIT doesn't support, this controls what happens:
- Throw: Stop and throw an exception (fail-fast)
- Fallback: Use interpreted execution for the entire graph (safe but slower)
- Hybrid: JIT-compile supported ops, interpret unsupported ones (best of both)
- Skip: Ignore unsupported ops (may produce incorrect results - use carefully)
For production, use Hybrid for best performance with guaranteed correctness.