From f2ab2f77102b5039302b48e59b1101ff809bb0f3 Mon Sep 17 00:00:00 2001 From: Paul Mulders Date: Wed, 10 May 2023 18:00:25 +0200 Subject: [PATCH] setup.py: ROCm build fixes --- setup.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c523ba073c5..732b5c0e1b7 100644 --- a/setup.py +++ b/setup.py @@ -328,9 +328,15 @@ def get_extensions(): image_src = ( glob.glob(os.path.join(image_path, "*.cpp")) + glob.glob(os.path.join(image_path, "cpu", "*.cpp")) - + glob.glob(os.path.join(image_path, "cuda", "*.cpp")) ) + if is_rocm_pytorch: + image_src += glob.glob(os.path.join(image_path, "hip", "*.cpp")) + # we need to exclude this in favor of the hipified source + image_src.remove(os.path.join(image_path, "image.cpp")) + else: + image_src += glob.glob(os.path.join(image_path, "cuda", "*.cpp")) + if use_png or use_jpeg: ext_modules.append( extension(