From 2aa342458d1278487f9ca47ff0111e74b20d63ef Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sun, 15 May 2011 18:35:41 -0400 Subject: cleanup. fixed tests --- tests/matrix_test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/matrix_test.py') diff --git a/tests/matrix_test.py b/tests/matrix_test.py index bc4115e..c843025 100644 --- a/tests/matrix_test.py +++ b/tests/matrix_test.py @@ -1,3 +1,4 @@ +import os import numpy as np from pycuda import autoinit from pycuda.compiler import SourceModule @@ -8,10 +9,12 @@ float3 = gpuarray.vec.float3 print 'device %s' % autoinit.device.name() -source = open('../matrix.h').read() + open('../linalg.h').read() + \ - open('matrix_test.cu').read() +current_directory = os.path.split(os.path.realpath(__file__))[0] +source_directory = current_directory + '/../src' -mod = SourceModule(source, no_extern_c=True, arch='sm_13') +source = open(current_directory + '/matrix_test.cu').read() + +mod = SourceModule(source, options=['-I' + source_directory], no_extern_c=True, cache_dir=False) det = mod.get_function('det') inv = mod.get_function('inv') -- cgit