diff --git a/setup.py b/setup.py index d9aed9b47bd8..30d4c166c8c5 100755 --- a/setup.py +++ b/setup.py @@ -211,6 +211,7 @@ def op_enabled(op_name): def create_dir_symlink(src, dest): + if not os.path.islink(dest): if os.path.exists(dest): os.remove(dest) diff --git a/tests/unit/inference/test_inference.py b/tests/unit/inference/test_inference.py index 894f040be207..bf8182796c86 100644 --- a/tests/unit/inference/test_inference.py +++ b/tests/unit/inference/test_inference.py @@ -280,6 +280,12 @@ def test( if invalid_test_msg: pytest.skip(invalid_test_msg) + if dtype not in get_accelerator().supported_dtypes(): + pytest.skip(f"Acceleraor {get_accelerator().device_name()} does not support {dtype}.") + + if not deepspeed.ops.__compatible_ops__[InferenceBuilder.NAME]: + pytest.skip("This op had not been implemented on this system.", allow_module_level=True) + model, task = model_w_task local_rank = int(os.getenv("LOCAL_RANK", "0"))