From 464e1408c02dc8b7f4f881c9624cdfa3cb4db7f9 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Mon, 13 Mar 2023 06:43:27 -0500 Subject: [PATCH 1/2] Tweaked compiler options used. Removed linker option -fsycl-device-code-split=per_kernel option from CFLAGS, added SDL mandated -fwrapv --- dpnp/backend/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpnp/backend/CMakeLists.txt b/dpnp/backend/CMakeLists.txt index baee709b11ee..330eb1030f3d 100644 --- a/dpnp/backend/CMakeLists.txt +++ b/dpnp/backend/CMakeLists.txt @@ -91,7 +91,6 @@ endif() # SYCL related compile options string(CONCAT COMMON_COMPILE_FLAGS "-fsycl " - "-fsycl-device-code-split=per_kernel " "-fno-approx-func " "-fno-finite-math-only " ) @@ -173,6 +172,7 @@ if(NOT WIN32) "-fno-delete-null-pointer-checks " "-fstack-protector-strong " "-fno-strict-overflow " + "-fwrapv " ) string(APPEND COMMON_LINK_FLAGS "LINKER:-z,noexecstack,-z,relro,-z,now " From d653acf32114089a7c6cec852985002e79a11961 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Mon, 13 Mar 2023 06:45:21 -0500 Subject: [PATCH 2/2] Specify dependencies on dpnp_algo on other included pyx files --- setup.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b7bfba6c28ba..31befbc1b237 100644 --- a/setup.py +++ b/setup.py @@ -125,7 +125,7 @@ ''' This variable controls setuptools execution on windows to avoid automatically search and confirm workability of the compiler - If not set, error "Microsoft Visual C++ 14.0 or greater is required." appiars + If not set, error "Microsoft Visual C++ 14.0 or greater is required." appears ''' os.environ["DISTUTILS_USE_SDK"] = "1" @@ -145,6 +145,21 @@ dpnp_algo = Extension( name="dpnp.dpnp_algo.dpnp_algo", sources=[os.path.join("dpnp", "dpnp_algo", "dpnp_algo.pyx")], + depends=[ + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_linearalgebra.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_manipulation.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_counting.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_statistics.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_trigonometric.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_sorting.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_arraycreation.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_mathematical.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_searching.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_indexing.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_logic.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_bitwise.pyx"), + os.path.join("dpnp", "dpnp_algo", "dpnp_algo_special.pyx"), + ], **kwargs_common) dpnp_dparray = Extension(