久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何使用 Visual Profiler 分析 PyCuda 代碼?

How to profile PyCuda code with the Visual Profiler?(如何使用 Visual Profiler 分析 PyCuda 代碼?)
本文介紹了如何使用 Visual Profiler 分析 PyCuda 代碼?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

當我創建一個新會話并告訴 Visual Profiler 啟動我的 python/pycuda 腳本時,我收到以下錯誤消息:Execution run #1 of program '' failed, exit code: 255

When I create a new session and tell the Visual Profiler to launch my python/pycuda scripts I get following error message: Execution run #1 of program '' failed, exit code: 255

這些是我的偏好:

  • 啟動:python "/pathtopycudafile/mysuperkernel.py"
  • 工作目錄:"/pathtopycudafile/mysuperkernel.py"
  • 參數:[empty]

我在 Ubuntu 10.10 下使用 CUDA 4.0.64位.分析編譯的示例工作.

I use CUDA 4.0 under Ubuntu 10.10. 64Bit. Profiling compiled examples works.

附言我知道 SO 問題 如何在 Linux 中分析 PyCuda 代碼?,但似乎是一個不相關的問題.

p.s. I am aware of SO question How to profile PyCuda code in Linux?, but seems to be an unrelated problem.

小例子

pycudaexample.py:

pycudaexample.py:

import pycuda.autoinit
import pycuda.driver as drv
import numpy

from pycuda.compiler import SourceModule

mod = SourceModule("""
__global__ void multiply_them(float *dest, float *a, float *b)
{
  const int i = threadIdx.x;
  dest[i] = a[i] * b[i];
}
""")

multiply_them = mod.get_function("multiply_them")

a = numpy.random.randn(400).astype(numpy.float32)
b = numpy.random.randn(400).astype(numpy.float32)

dest = numpy.zeros_like(a)
multiply_them(
        drv.Out(dest), drv.In(a), drv.In(b),
        block=(400,1,1), grid=(1,1))

pycuda.autoinit.context.detach()

示例設置

錯誤信息

推薦答案

您為計算分析器指定可執行文件的方式有問題.如果我在您發布的代碼的頂部放了一條井號線:

There is something wrong with the way you are specifying the executable to the compute profiler. If I put a hash bang line at the top of your posted code:

#!/usr/bin/env python

然后給python文件可執行權限,計算分析器運行代碼沒有抱怨,我得到這個:

and then give the python file executable permissions, the compute profiler runs the code without complaint and I get this:

這篇關于如何使用 Visual Profiler 分析 PyCuda 代碼?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時出現問題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節點)
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應并將元素值存儲在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對象)
主站蜘蛛池模板: 一区二区三区电影在线观看 | 青青草在线视频免费观看 | 久久一区二区三区免费 | 天天草狠狠干 | 国产一区二区免费 | 欧美一级免费看 | 一区二区三区高清 | 成人一级视频在线观看 | 久久久久国产一区二区三区四区 | 久久精品亚洲精品国产欧美 | 国产精品久久久一区二区三区 | 日韩精品一区二区三区中文字幕 | 久久人爽 | 国产成人在线播放 | 欧美日韩成人影院 | 亚洲九九色 | 成人黄色在线观看 | 在线视频国产一区 | 国产韩国精品一区二区三区 | 日韩在线欧美 | 97伊人| 国产日韩精品视频 | 国产亚洲一区在线 | 精品视频在线播放 | 97起碰| 日韩激情网 | 欧洲妇女成人淫片aaa视频 | 精品国产乱码久久久久久1区2区 | 97精品超碰一区二区三区 | 日韩欧美手机在线 | 欧美乱码精品一区二区三区 | 999热精品视频 | 色婷婷av一区二区三区软件 | 91久久精品一区二区二区 | 在线午夜电影 | 天堂在线中文字幕 | 拍拍无遮挡人做人爱视频免费观看 | 中文字幕1区2区 | 91在线电影 | 一呦二呦三呦国产精品 | 国产成人99久久亚洲综合精品 |