def check_cbwr(self, branch, cnr_const): status = mkl.cbwr_set(branch=branch) if status == 'success': expected_value = 'branch_off' if branch == 'off' else branch actual_value = mkl.cbwr_get(cnr_const=cnr_const) assert_equals(actual_value, expected_value, msg="Round-trip failure for CNR branch '{}', CNR const '{}'".format(branch, cnr_const)) elif status != 'err_unsupported_branch': raise AssertionError(status)
def test_cbwr_set_avx512(self): mkl.cbwr_set(branch='avx512')
def test_cbwr_set_avx512_mic(self): mkl.cbwr_set(branch='avx512_mic')
def test_cbwr_set_avx(self): mkl.cbwr_set(branch='avx')
def test_cbwr_set_sse4_2(self): mkl.cbwr_set(branch='sse4_2')
def test_cbwr_set_ssse3(self): mkl.cbwr_set(branch='ssse3')
def test_cbwr_set_compatible(self): mkl.cbwr_set(branch='compatible')
def test_cbwr_set_auto(self): mkl.cbwr_set(branch='auto')
def test_cbwr_set_off(self): mkl.cbwr_set(branch='off')