Skip to content

[REFACTOR][TEST] Replace CompareBeforeAfter for pytest compact - #18711

Merged
tqchen merged 1 commit into
apache:mainfrom
tqchen:test-update
Feb 4, 2026
Merged

tqchen merged 1 commit into
apache:mainfrom
tqchen:test-update

Conversation

@tqchen

@tqchen tqchen commented Feb 4, 2026

Copy link
Copy Markdown
Member

This PR refactors test infrastructure by removing the CompareBeforeAfter base class from tvm.testing and converting all dependent tests to use a simpler, more explicit pattern.

We need this change as latest pytest do not allow calling fixture as inner patterns which the previous CompareBeforeAfter depend on.

@tqchen tqchen changed the title [REFACTOR[[TEST] Replace CompareBeforeAfter for pytest compact [REFACTOR][TEST] Replace CompareBeforeAfter for pytest compact Feb 4, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @tqchen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly updates the testing framework by eliminating a problematic base class and migrating its usages to a more direct and compatible approach. The change improves the robustness of the test suite against external library updates and simplifies the overall structure of individual tests, making them easier to understand and maintain.

Highlights

  • Refactor Test Infrastructure: The CompareBeforeAfter base class from tvm.testing has been removed, streamlining the test setup for TIR transformations.
  • Pytest Compatibility: This refactoring addresses an incompatibility with recent pytest versions that no longer allow calling fixtures as inner patterns, which the old CompareBeforeAfter class relied upon.
  • Simplified Test Patterns: All dependent tests have been converted from class-based structures to simpler, more explicit function-based patterns, directly embedding transformation logic and structural assertions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • python/tvm/testing/utils.py
    • Removed the CompareBeforeAfter class entirely, as it was no longer compatible with recent pytest versions.
  • tests/python/dlight/test_cpu_gemv.py
    • Converted class-based tests (BaseBeforeAfter, TestGEMV) to a standalone function (test_gemv_basic).
    • Moved transformation logic and structural assertions directly into the test function.
    • Updated T.prim_func decorators to include private=True.
  • tests/python/dlight/test_gpu_conv.py
    • Converted class-based tests (BaseBeforeAfter, TestConv3d) to a standalone function (test_conv3d).
    • Moved transformation logic and structural assertions directly into the test function.
    • Removed pytest import as it's no longer directly used.
    • Updated T.prim_func decorators to include private=True.
  • tests/python/dlight/test_gpu_gemv.py
    • Converted class-based tests (BaseBeforeAfter, TestGEMV) to a standalone function (test_gemv_basic).
    • Moved transformation logic and structural assertions directly into the test function.
    • Removed pytest import as it's no longer directly used.
    • Updated T.prim_func decorators to include private=True.
  • tests/python/dlight/test_gpu_matmul.py
    • Converted multiple class-based tests (TestMatmul, TestFusedMatmul, TestSkipGEMV, TestOutputFP32, TestInlineConsumerChain, AndroidBeforeAfter, TestMatmulAndroid, MetalBeforeAfter, TestMatmulMetal, TestMatmulMetalInt4Quant) to standalone functions.
    • Moved transformation logic and structural assertions directly into the test functions.
    • Removed pytest import as it's no longer directly used.
    • Updated T.prim_func decorators to include private=True and removed global_symbol attributes where appropriate.
  • tests/python/dlight/test_gpu_matmul_tensorize.py
    • Converted multiple class-based tests (TestMatmulTensorize, TestMatmulTensorizeTooSmall, TestMatmulTensorizeEpilogue, TestMatmulInt8Tensorize, TestMatmulInt8Tensorize3d2dDyn, MetalBeforeAfter, TestMatmulMetal) to standalone functions.
    • Moved transformation logic and structural assertions directly into the test functions.
    • Removed pytest import as it's no longer directly used.
    • Updated T.prim_func decorators to include private=True and removed global_symbol attributes where appropriate.
  • tests/python/meta_schedule/test_meta_schedule_postproc_rewrite_layout.py
    • Converted class-based tests (BaseBeforeAfter, TestTIRMatmul, TestRewrittenBuffersMustOccurWithinBlock, TestExtentOne, TestLayoutRewriteInt64Index) to standalone functions.
    • Introduced a helper function _apply_rewrite_layout to encapsulate the transformation logic.
    • Added pytest import.
    • Updated T.prim_func decorators to include private=True and removed global_symbol attributes where appropriate.
  • tests/python/relax/test_transform_compute_prim_value.py
    • Converted class-based tests (BaseCompare, TestPrimValueInAssertCondition, TestPrimValueInBranchCondition, TestPrimValueInPureFunction) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_convert_dataflow.py
    • Converted class-based tests (ExtractCompare, TestTrivial, TestBasic, TestMultipleBlocks, TestExtractInsideBranches, TestTreatNonCallAsPure, TestImpureInnerFunction, TestPureInnerFunction, TestImpureExternalFunction, TestPureExternalFunction, TestMergeWithPrecedingDataflowBlock, TestMergeWithNextDataflowBlock, TestPreserveExistingDataflowBlocksAtBeginning, TestPreserveExistingDataflowBlocksAtEnd) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_expand_tuple_args.py
    • Converted class-based tests (BaseCompare, TestSimple, TestNested) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_remove_unused_outputs.py
    • Converted class-based tests (BaseCompare, TestSimple, TestUseMultipleOutputs, TestMultipleCallSites, TestReturnTuple) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_remove_unused_parameters.py
    • Converted class-based tests (BaseCompare, TestRemoveUnusedRelaxParameter, TestReplaceSymbolicVariables, TestNoExtraSymbolicVariables, TestRemoveExtraPrimVariables, TestRemoveExtraShapeVariables) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_rewrite_cuda_graph.py
    • Converted class-based tests (BaseCompare, TestNullValue, TestMergeAllocFuncs, TestDisableCaptureOutput, TestStaticInputWithSymbolicShape) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/relax/test_transform_topological_sort.py
    • Converted multiple class-based tests (TestDepthFirstFromInputs, TestDepthFirstFromInputWithConstant, TestDepthFirstFromInputWithMultipleInputs, TestDepthFirstBreakTiesByExistingOrder, TestDepthFirstFromOutput, TestDepthFirstFromOutputTupleWithBinding, TestDepthFirstFromOutputTupleWithoutBinding, TestDepthFirstFromOutputWithUnusedVariables, TestDepthFirstFromInputWithUnusedParameters, TestBreadthFirst, TestBreadthFirstBreakTiesByExistingOrder) to standalone functions.
    • Moved transform application and structural assertions inline within the test functions.
  • tests/python/testing/test_tvm_testing_before_after.py
    • Removed the BaseBeforeAfter class.
    • Converted all test classes (TestBeforeAfterPrimFunc, TestBeforeAfterMethod, TestBeforeAfterFixture, TestBeforeAfterDelayedPrimFunc, TestBeforeAfterParametrizedFixture, TestBeforeAfterIRModule, TestBeforeAfterIRModuleExplicitFixture) to standalone functions.
    • Updated T.prim_func decorators to include private=True.
  • tests/python/tir-analysis/test_tir_analysis_identify_memcpy.py
    • Removed the BaseTest class.
    • Converted all test classes to standalone functions.
    • Introduced a helper function _check_memcpy_results for result validation.
  • tests/python/tir-base/test_slice_tir.py
    • Converted class-based tests (TestParseCallTIR, TestAnnotateAndSliceTIR) to standalone functions.
    • Updated T.prim_func decorators to include private=True.
  • tests/python/tir-base/test_tir_stmt_functor_substitute.py
    • Converted class-based tests (BaseCompare, TestBasicSubstitute, TestSubstituteAllocate, TestSubstituteBufferLoad, TestSubstituteDeclBuffer) to standalone functions.
    • Introduced a helper function _apply_substitute for applying the transform.
  • tests/python/tir-schedule/test_tir_schedule_reduction.py
    • Converted the TestDecomposeReductionWithThreadBinding class to a standalone function.
  • tests/python/tir-schedule/test_tir_schedule_set_axis_separator.py
    • Converted the TestIndexedLookup class to a standalone function.
  • tests/python/tir-schedule/test_tir_schedule_transform_layout.py
    • Converted multiple class-based tests (TestTransformLayoutWithCacheWriteAndAxisSeparators, BasePaddingCompare, TestNoPadding, TestNoPaddingMultipleUsage, TestNoPaddingOpaqueBlock, TestErrorIfPaddingForbidden, TestImplicitPaddingAssumeInjective, TestErrorOnWrongPaddingType, TestErrorOnNonMatchingTypes, TestPaddedTransformIfThenElse, TestPaddedTransformWithoutLoop, TestPaddedTransformIfThenElseReduction, TestPaddedTransformIfThenElseReductionOpaque, TestPaddedTransformPostProcIfRequiredDueToSideEffects, TestPaddedTransformOfInputCreatesAssumption, TestPaddedTransformNonConstantValue, TestPaddedTransformRepeatedBufferElement, TestPadValueMayNotReferenceOtherBuffer, TestTransformLayoutWithVar, TestTransformWithAxisSeparators, TestTransformWithAxisSeparatorsOpaqueBlock) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_annotate_device_regions.py
    • Converted class-based tests (BaseCompare, TestAnnotateThreadExtent, TestAnnotateDeviceScope) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_annotate_irregular_loop.py
    • Converted class-based tests (BaseCompare, TestAnnotateLoopWithBreak, TestAnnotateLoopWithContinue, TestNestedIrregularBothLoops, TestWhileLoopWithBreak, TestBreakInNestedConditional, TestWhileLoopWithBreakStandalone, TestNestedIrregularLoopStandalone) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_combine_context_call.py
    • Converted class-based tests (TestCombineContextsInLoop, TestCombineContextsInLoopWithoutTarget) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_convert_blocks_to_opaque.py
    • Converted the TestErrorIfPredicateUsesBlockVariables class to a standalone function.
  • tests/python/tir-transform/test_tir_transform_convert_ssa.py
    • Converted multiple class-based tests (BaseBeforeAfter, TestReuseInSequentialLetStmt, TestReuseInNestedLetStmt, TestReusedVarAcrossModule, TestReusedParameter, TestReusedBufferObj, TestReusedBufferParameter, TestKeepDuplicateThreadIdxInSameFunction, TestDeDuplicateThreadIdxAcrossMultipleFunctions, TestDeDuplicateThreadIdxIterVarAcrossMultipleFunctions, TestThreadIdxReusedWithinAndAcrossFunctions, TestTrackForwardDeclarationsInAttrStmt) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_device_kernel_launch.py
    • Converted class-based tests (BaseCompare, TestLowerDeviceKernelLaunch, TestExternallyVisibleKernelLaunch, TestCollectLaunchParameter, TestSameDeviceDifferentTarget) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_flatten_buffer.py
    • Converted multiple class-based tests (BaseCompare, TestElementwise, TestElementwiseWithoutDeclBuffer, TestGPU, TestSymbolic, TestFusedSymbolic, TestFusedSymbolicWithPredicate, TestMultiAlloc, TestStrided, TestBoolean, TestFlattenInsideBlock, TestNoChangeTo2DPhysicalBuffer, TestFlattenAllocBufferWithAxisSeparators, TestFlattenDeclBufferWithAxisSeparators) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_helpers.py
    • Converted multiple class-based tests (TestBindTarget, TestBindTargetWithHostToExposedFunction, TestBindTargetWithHostToInternalFunction, TestBindTargetIgnoresExisting, TestBindTargetUpdatesHost, TestBindTargetMultipleFunctions, TestBindTargetWithDeviceHostCallSameFunc, TestFilterRemovesGlobalVarMap) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_hoist_expression.py
    • Converted multiple class-based tests (BaseBeforeAfter, TestHoistToTop, TestSuppressHoistIfElse, TestHoistBlockVar, TestSuppressHoistBlockVar, TestHoistAcrossBlockVar, TestSuppressHoistAcrossBlockVar, TestHoistToMiddle, TestHoistWithLet, TestHoistDisableLet, TestHoistIfElse, TestHoistSequentialAssign, TestHoistMultiIf, TestHoistComplexConditional, TestSuppressSplittingConditional, TestHoistMultiIfElse, TestHoistMultiIfElseDifferentBranches, TestHoistIfElseExpr, TestSuppressHoistIfElseExpr, TestHoistLetExpr, TestSuppressHoistLetExpr) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_inject_double_buffer.py
    • Converted class-based tests (TestDoubleBuffer, TestDoubleBufferWithDeclBuffer) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_inject_ptx_async_copy.py
    • Converted the TestMultiplicationNodesAreInligned class to a standalone function.
  • tests/python/tir-transform/test_tir_transform_lower_device_storage_access_info.py
    • Converted class-based tests (BaseCompare, TestLowerCPUAccessibleScope, TestLowerCPUAccessibleScopeWithDeclBuffer, TestLowerCPUInaccessibleScope, TestLowerCPUInaccessibleScopeWithDeclBuffer) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_lower_thread_all_reduce.py
    • Converted multiple class-based tests (BaseCompare, BaseFailure, TestBasic, TestBasicWithDeclBuffer, TestReduceSummation, TestMultiGroupReduction, TestMultiGroupMask1, TestMultiWarpReduce1, TestMultiWarpReduce2, TestMultiGroupMultiWarpReduction, TestMultiGroupMultiWarpPredicatedReduction, TestMetalNoMask) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_lower_tvm_builtin.py
    • Converted class-based tests (TestLowerDeviceAllocate, TestLowerCPUAllocation, TestLowerAllocateRequiresDeviceID, TestLowerAllocateRequiresDeviceType, TestLowerCPUAllocWithFunctionAttr) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_make_unpacked_api.py
    • Converted class-based tests (TestTargetHostRemoved, TestInternalSubroutineCall, TestSubroutineCallToExternallyVisibleSubroutine, TestCallExternallyVisibleSubroutineWithDLTensor) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_merge_dynamic_shared_memory_allocations.py
    • Converted multiple class-based tests (TestMatmul, TestSimpleAllocNoReuse, TestSimpleAllocReuse, TestAsyncCopy) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_pointer_value_type_rewrite.py
    • Converted class-based tests (BaseCompare, TestRewriteToShuffle0, TestRewriteToShuffle1, TestAddressOf, TestScalarReadWithoutWrite) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_reduce_branching_through_overcompute.py
    • Converted multiple class-based tests (BaseBeforeAfter, TestIntroduceNoOp, TestIntroduceAdditionOfZero, TestIntroduceAdditionOfKnownZeroInBuffer, TestIntroduceOverwrittenWrite, TestMaintainValuesUsedLater, TestIdentifyOverwrittenWriteFromEquivalentExpressions, TestIntroduceSupersetOverwrittenWrite) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_remove_assume.py
    • Converted class-based tests (BaseBeforeAfter, TestRemoveAssume, TestRemoveAssumeLoop) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_remove_no_op.py
    • Converted multiple class-based tests (BaseBeforeAfter, TestRemoveEmptyForLoop, TestRemoveZeroExtentLoop, TestRemoveUnusedLet, TestRemoveLetUsedOnlyInNoOp, TestKeepSideEffectsOfLet, TestRemoveEmptyThenCase, TestRemoveEmptyElseCase, TestRemoveUnusedWrite, TestSuppressRemovalOfUnusedWrite, TestKeepSideEffectsOfUnusedWrite, TestKeepFirstWriteWhenUsed, TestRemoveOverwrittenLoop, TestRemoveOverwrittenSubloop, TestKeepPartiallyOverwrittenLoop, TestRemoveOverwrittenPredicatedLoopWithIdenticalCondition, TestRemoveOverwrittenPredicatedLoopWithProvableCondition, TestRemoveSeparatedOverwrites, TestRemoveSeparatedOverwriteOfPredicatedLoop, TestRemoveReadWrite, TestKeepReadWriteToDifferentIndices, TestRemoveReadWriteSameIndexDifferentExpression, TestRemoveReadWriteSameIndexUsingConstraint, TestRemoveWritingOfKnownValue, TestKeepOneOfDuplicateLoops, TestRemoveEmptyTemporary, TestRemoveEmptyTemporaryWithDeclBuffer, TestRemoveUnusedTemporary, TestRemoveUnusedWriteIntoTemporary, TestKeepUsedWriteIntoTemporary, TestRemoveWriteIntoTemporary, TestCertainConditon) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_remove_undef.py
    • Converted class-based tests (BaseBeforeAfter, TestRemoveStoreUndef, TestRemoveStoreUndefExpression, TestKeepOtherCallNodes, TestRemoveLetUndef, TestRaiseErrorForUndefAsStoreIndices, TestRaiseErrorForUndefAsLoadIndices) to standalone functions.
  • tests/python/tir-transform/test_tir_transform_simplify.py
    • Converted multiple class-based tests (BaseBeforeAfter, TestLoadStoreNoop, TestLoadStoreNoopAfterSimplify, TestNestedCondition, TestNestedProvableCondition, TestNestedVarCondition, TestAlteredBufferContents, TestNegationOfCondition, TestNegationOfNotEqual, TestNegationOfVarCondition, TestLiteralConstraintSplitBooleanAnd, TestLiteralConstraintSplitBooleanOr, TestProveConditionUsingLet, TestProveLetCondition, TestProveRepeatedLetCondition, TestIfThenElseExpr, TestCeilLog2Int, TestLeftCeilLog2LowerBound, TestLeftShiftLowerBound, TestLeftShiftUpperBound, TestLeftShiftOfNegativeValue, TestLeftShiftByNegativeValue, TestRemoveTransitivelyProvableCondition, TestSuppressTransitivelyProvableCondition, TestRewriteAsAndOfOrs, TestSuppressRewriteAsAndOfOrs, TestRewriteAsAndOfOrsWithTopLevelAnd, TestRewriteAsAndOfOrsWithSimplificationBetweenGroups, TestRewriteAsAndOfOrsWithSimplificationBetweenReorderedGroups, TestRewriteAsAndOfOrUsingSimplificationAcrossAnd, TestRewriteAsAndOfOrUsingSimplificationWithinOr, TestConditionalFloorMod, TestSimplifyRHSOfBooleanAndUsingLHS, TestSimplifyLHSOfBooleanAndUsingRHS, TestSimplifyRHSOfBooleanOrUsingLHS, TestSimplifyLHSOfBooleanOrUsingRHS, TestSimplifyRHSOfBooleanAndUsingLHSWithoutConst, TestSimplifyLHSOfBooleanAndUsingRHSWithoutConst, TestSimplifyRHSOfBooleanOrUsingLHSWithoutConst, TestSimplifyLHSOfBooleanOrUsingRHSWithoutConst, TestProvableConditionWithOffset, TestMostRestrictiveConditional, TestAlteredBufferContents, TestPossiblyAlteredBufferContents, TestSimplifyInputAssumption, TestNoSimplifyFromScopedInputAssumption, TestSimplifyConditionalUsingBufferValue, TestKeepExpressionSimplifyUsingBufferValue, TestSimplifyConditionalInLoopUsingBufferValue, TestSimplifyUsingBufferAssumption, TestSimplifyUsingBufferAssumptionInLoop, TestSimplifyUsingPartiallyKnownBufferConditional, TestSimplifyUsingPartiallyKnownBufferExpression, TestNoSimplificationIfPredicateNotMet, TestNoSimplifyUsingInvalidatedScopedConstraint, TestNoSimplifyUsingOverwrittenValue, TestNoSimplifyUsingLoopDependentBufferValue, TestSimplifyPriorToOverwrittenValue, TestSimplifyElementWiseUsingPreLoopBufferValue, TestSimplifyNonConditional, TestSuppressSimplifyNonConditional, TestSimplifyUsingTransitiveKnownBufferValue, TestSimplifyRampIndexBroadcastValue, TestSimplifyRampIndexRampValue, TestSimplifyUsingPartiallyProvenBufferValueGather, TestSimplifyUsingPartiallyProvenBufferValueScatter) to standalone functions.`
Activity
  • The pull request was created by tqchen.
  • The primary activity involves refactoring test code to remove the CompareBeforeAfter utility and update all its usages across numerous test files.
  • This is a significant code cleanup and modernization effort for the testing infrastructure.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a large-scale refactoring that removes the tvm.testing.CompareBeforeAfter class, which is incompatible with modern pytest versions. You've done an excellent job of converting all dependent tests to a more explicit and readable pattern using standalone functions, IRModule definitions for Before and Expected states, and direct calls to tvm.ir.assert_structural_equal. The changes are consistent across all modified files and significantly improve the test suite's maintainability. The code is cleaner and the tests are now more self-contained. Great work on this substantial refactoring effort!

…st pytest compact

This commit refactors test infrastructure by removing the
CompareBeforeAfter base class from tvm.testing and converting
all dependent tests to use a simpler, more explicit pattern.

We need this change as latest pytest do not allow calling fixture as inner patterns
which the previous CompareBeforeAfter depend on.
@tqchen
tqchen merged commit 0079ff7 into apache:main Feb 4, 2026
12 checks passed
tqchen added a commit that referenced this pull request Oct 16, 2026
This PR refactors test infrastructure by removing the CompareBeforeAfter
base class from tvm.testing and converting all dependent tests to use a
simpler, more explicit pattern.

We need this change as latest pytest do not allow calling fixture as
inner patterns which the previous CompareBeforeAfter depend on.
tqchen added a commit that referenced this pull request Oct 18, 2026
This PR refactors test infrastructure by removing the CompareBeforeAfter
base class from tvm.testing and converting all dependent tests to use a
simpler, more explicit pattern.

We need this change as latest pytest do not allow calling fixture as
inner patterns which the previous CompareBeforeAfter depend on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants