@parameterized.named_parameters(({'testcase_name': f'_{name}', 'cond': cond} for (cond, name) in COND_IMPLS))
def testCondJitDisabled(self, cond):

    def f_ref(x):
        return ((3.0 * x) if (x < 2) else jnp.sin(x))

    def f(x):
        return cond((x < 2), (lambda x: (3.0 * x)), (lambda x: jnp.sin(x)), x)
    with api.disable_jit():
        y = f(1.0)
        expected = f_ref(1.0)
        self.assertAllClose(y, expected, check_dtypes=False)
    with api.disable_jit():
        y = api.jit(f)(1.0)
        expected = f(1.0)
        self.assertAllClose(y, expected, check_dtypes=False)
@parameterized.named_parameters(({'testcase_name': f'_{name}', 'cond': cond} for (cond, name) in COND_IMPLS))
def testCondJitDisabled(self, cond):

    def f_ref(x):
        return ((3.0 * x) if (x < 2) else jnp.sin(x))

    def f(x):
        return cond((x < 2), (lambda x: (3.0 * x)), (lambda x: jnp.sin(x)), x)
    with api.disable_jit():
        y = f(1.0)
        expected = f_ref(1.0)
        self.assertAllClose(y, expected, check_dtypes=False)
    with api.disable_jit():
        y = api.jit(f)(1.0)
        expected = f(1.0)
        self.assertAllClose(y, expected, check_dtypes=False)