Skip to content

fix(test-activation): load-fused-kernels test never (+1 more) - #21

Open
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/test-activation-assorted-39dad03e
Open

fix(test-activation): load-fused-kernels test never (+1 more)#21
andrewwhitecdw wants to merge 1 commit into
NVIDIA:mainfrom
andrewwhitecdw:bugfix/test-activation-assorted-39dad03e

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

This PR addresses 2 issues in tests/test_activation.py.

Fix 1

fix: load-fused-kernels test never exercises import

Fix: Replace:

def test_load_fused_kernels():
    try:
        print("[Success] load_fused_kernels")
    except ImportError as e:
        print("[Fail] load_fused_kernels")
        raise e

with:

def test_load_fused_kernels():
    try:
        from alias_free_activation.cuda import load
        load.load()
        print("[Success] load_fused_kernels")
    except ImportError as e:
        print("[Fail] load_fused_kernels")
        raise e

Fix 2

fix: activation diff test prints failure but never raises

Fix: Replace:

    else:
        print(
            f"\n[Fail] test_fused_anti_alias_activation"
            f"\n > mean_difference={diff}, "
            f"\n > fused_values={fused_activation_output[-1][-1][:].tolist()}, "
            f"\n > torch_values={torch_activation_output[-1][-1][:].tolist()}"
        )

with:

    else:
        print(
            f"\n[Fail] test_fused_anti_alias_activation"
            f"\n > mean_difference={diff}, "
            f"\n > fused_values={fused_activation_output[-1][-1][:].tolist()}, "
            f"\n > torch_values={torch_activation_output[-1][-1][:].tolist()}"
        )
        raise AssertionError(
            f"test_fused_anti_alias_activation failed: mean_difference={diff}"
        )

Files changed

  • tests/test_activation.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review July 28, 2026 00:33
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.

1 participant