mirror of
https://github.com/andreinechaev/nvcc4jupyter.git
synced 2026-06-13 18:50:47 +05:30
path to nvcc
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@ import tempfile
|
|||||||
import subprocess
|
import subprocess
|
||||||
import IPython.core.magic as ipym
|
import IPython.core.magic as ipym
|
||||||
|
|
||||||
|
compiler = '/usr/local/cuda/bin/nvcc'
|
||||||
ext = '.cu'
|
ext = '.cu'
|
||||||
|
|
||||||
|
|
||||||
@@ -25,7 +26,7 @@ class NVCCPlugin(ipym.Magics):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def compile(file_path):
|
def compile(file_path):
|
||||||
subprocess.check_output(["nvcc", file_path + ext, "-o", file_path + ".out"], stderr=subprocess.STDOUT)
|
subprocess.check_output([compiler, file_path + ext, "-o", file_path + ".out"], stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
def run(self, file_path, timeit=False):
|
def run(self, file_path, timeit=False):
|
||||||
if timeit:
|
if timeit:
|
||||||
|
|||||||
Reference in New Issue
Block a user