def test_model_compiled(model):
    """
    Verifies that all models can be torch compiled without issue
    and if the outputs are the same.
    """
    # This assumes the model has attributes n_chans and n_times
    try:
        n_chans = model.n_chans
    except ValueError:
        n_chans = default_signal_params["n_chans"]
    try:
        n_times = model.n_times
    except ValueError:
        n_times = default_signal_params["n_times"]
    input_tensor = torch.randn(1, n_chans, n_times)
    not_compiled_model = model
    compiled_model = torch.compile(model, mode="reduce-overhead", dynamic=False)
    torch.compiler.reset()

    output = not_compiled_model(input_tensor)
    output_compiled = compiled_model(input_tensor)

    assert output.shape == output_compiled.shape
    assert output_compiled.allclose(output, atol=1e-4)

    Verifies that all models can be torch compiled without issue
    and if the outputs are the same.
    
test/unit_tests/models/test_integration.py