From 9fbcd08c450a716660417646f6784a0d9d064504 Mon Sep 17 00:00:00 2001
From: Isuru Fernando <isuruf@gmail.com>
Date: Sun, 2 Oct 2022 21:59:00 -0500
Subject: [PATCH] Fix spirv file name location

---
 test/test_wrapper.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/test_wrapper.py b/test/test_wrapper.py
index 758b05c0..c0ecdcaa 100644
--- a/test/test_wrapper.py
+++ b/test/test_wrapper.py
@@ -1105,7 +1105,11 @@ def test_spirv(ctx_factory):
     b_dev = cl.clrandom.rand(queue, n, np.float32)
     dest_dev = cl_array.empty_like(a_dev)
 
-    with open("add-vectors-%d.spv" % queue.device.address_bits, "rb") as spv_file:
+    from os.path import dirname, join
+    spv_filename = join(dirname(__file__),
+            "add-vectors-%d.spv" % queue.device.address_bits)
+
+    with open(spv_filename, "rb") as spv_file:
         spv = spv_file.read()
 
     prg = cl.Program(ctx, spv).build()
-- 
GitLab