摘要: 网页来自https://www.cnblogs.com/bigben0123/p/16638412.html 避免了将数据从服务器上拷贝后再分析,再借助端口转发,下面是一个网页的方式, http://localhost:8090/vis_trace.html?tracing_url=http://l 阅读全文
posted @ 2025-01-13 22:59 zwlwf 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 通过pytorch的torch.profiler带调用栈采集运行过程可以看到如下信息,通过chrome://tracing查看, 图上每个小条条表示一个traceEvent, json中的信息如下图所示,其中cat表示traceEvent的类型,有cpu_op,python_function等,前者 阅读全文
posted @ 2025-01-12 18:32 zwlwf 阅读(33) 评论(0) 推荐(0) 编辑
摘要: cuda api的采样主要cudart提供了profiler的接口,定义在cuda_profiler_api.h文件中,下面的代码是一个例子。 参考 https://blog.csdn.net/weixin_43603658/article/details/130441136,可以看到使用cudaP 阅读全文
posted @ 2025-01-08 23:13 zwlwf 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 被打桩的函数是STUB_FUN, 可以替换成如__cudaRegisterFunction, 另外插入的函数zwl_profiler可另外定义, .text .section .rodata .LC0: .string "STUB_FUN" .text .globl STUB_FUN .type S 阅读全文
posted @ 2025-01-05 22:33 zwlwf 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 原始代码 // Type your code here, or load an example. extern "C" __global__ void square(int* array, int n) { int tid = blockDim.x * blockIdx.x + threadIdx. 阅读全文
posted @ 2025-01-05 21:43 zwlwf 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 下面介绍了cblas中常用缩略词的含义,api https://blog.csdn.net/weixin_43800762/article/details/87811697 阅读全文
posted @ 2024-12-24 06:57 zwlwf 阅读(5) 评论(0) 推荐(0) 编辑
摘要: tic-toc.s对外提供两个接口,void tic(void), uint64_t toc(void), 用法基本类似matlab的tic toc函数,toc函数返回的是cycles, 转换成时间需要除cpu tsc的频率,tsc频率一般不是cpu主频,而是最大频率的1/2,(cpu有最大和睡眠频 阅读全文
posted @ 2024-12-15 17:17 zwlwf 阅读(16) 评论(0) 推荐(0) 编辑
摘要: SWIG的python接口使用demo 主要准备三个文件,example.h, example.i, example.c, example.i, %module example %{ #include "example.h" %} %include "example.h" //exampe.h in 阅读全文
posted @ 2024-11-10 00:19 zwlwf 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <cuda_runtime.h> // 128 x 128 -> __global__ void mm(float* a, float* b, float* c) { // 8 x 8个方块,每个方块16x16 extern __shared_ 阅读全文
posted @ 2024-10-20 20:09 zwlwf 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 编译x86的kernel export ARCH=x86_64 export CROSS_COMPILE=x86_64-linux-gnu- make defconfig make -j32 中间出现了libelf.h找不到, sudo apt-get install libelf-dev bc解决 阅读全文
posted @ 2024-10-13 23:20 zwlwf 阅读(26) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示