提交 bb892b77 authored 作者: James Bergstra's avatar James Bergstra

nvcc - capped the number of registers to 32.

上级 d17d67bd
...@@ -122,6 +122,9 @@ def nvcc_module_compile_str(module_name, src_code, location=None, include_dirs=[ ...@@ -122,6 +122,9 @@ def nvcc_module_compile_str(module_name, src_code, location=None, include_dirs=[
cmd.extend(['-l%s'%l for l in libs]) cmd.extend(['-l%s'%l for l in libs])
if sys.platform == 'darwin': if sys.platform == 'darwin':
cmd.extend(darwin_python_lib.split()) cmd.extend(darwin_python_lib.split())
#cmd.append("--ptxas-options=-v") #uncomment this to see register and shared-mem requirements
cmd.extend(["--maxrregcount=32"]) #TODO: compile ptx file without constraint and then use
# the number of registers required to inform the maximum number of threads per block.
debug('Running cmd', ' '.join(cmd)) debug('Running cmd', ' '.join(cmd))
p = subprocess.Popen(cmd, stderr=subprocess.PIPE) p = subprocess.Popen(cmd, stderr=subprocess.PIPE)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论