import os dir = os.path.split(os.path.realpath(__file__))[0] kernel = open(dir + '/kernel.cu').read()