test(compile-hlo): trace-mode conv2d/maxPool2d/upsample2d export regression (#1219) - #1257
Merged
Merged
Conversation
…ession (#1219) Records conv2d -> maxPool2d -> upsample2d through the KSP tracing wrapper on a void context (the network{}/sequential{} path the issue describes, not dag{}), builds the graph with synthesized inputs, and exports through toStableHlo — the issue's exact entry point, createBasic under the default STRICT policy. Asserts stablehlo.convolution, a reduce_window pooling, static shapes end to end, and no registry misses. Verified as a genuine reproduction: with createBasic's NeuralNetOperationsConverter registration (#1248) removed, the test fails with 'No converter found for operation: conv2d' at n0_conv2d — the issue's symptom, now a hard error instead of a comment. The tracer's attribute spellings (stride/padding/dilation/groups pairs, kernelSize, scale/mode/alignCorners) already match what the converter reads. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1219.
The issue's symptom — a trace-mode (
network{}/sequential{}) model usingconv2d,maxPool2d,upsample2dexported throughtoStableHloemitting// Unsupported op '<name>'for every such node and still "succeeding" — is fixed ondevelopby #1248:toStableHlousesStableHloConverterFactory.createBasic, which never registeredNeuralNetOperationsConverter(the "Known names" list in the issue genuinely has no convolution/pooling/upsampling entries), and conversion is now strict, so a registry miss can no longer masquerade as a successful export.This PR pins it with an end-to-end regression on the trace path: conv2d → maxPool2d → upsample2d recorded through the KSP tracing wrapper on a void context,
toComputeGraph(synthesizeExternalInputs = true, inputTensorIds = …), thentoStableHlounder the default STRICT policy — assertingstablehlo.convolution, areduce_windowpooling, the static shapes (tensor<1x4x8x8xf32>/tensor<1x4x4x4xf32>) and noUnsupported op/Conversion failedtext.Verified as a real reproduction: with #1248's
createBasicregistration temporarily removed, the test fails withHloConversionException: … No converter found for operation: conv2datn0_conv2d— exactly the issue's first failing node. The tracer's attribute spellings (stride/padding/dilation/groupsas pairs,kernelSize,scale/mode/alignCorners) already match whatNeuralNetOperationsConverterreads, so no converter change was needed. Full compile-hlo suite green.