Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
d9a8471b
提交
d9a8471b
authored
5月 17, 2025
作者:
Ben Mares
提交者:
Ricardo Vieira
5月 19, 2025
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove dead C code importing time.h
上级
24a2234b
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
1 行增加
和
21 行删除
+1
-21
blas.py
pytensor/tensor/blas.py
+1
-21
没有找到文件。
pytensor/tensor/blas.py
浏览文件 @
d9a8471b
...
...
@@ -460,13 +460,6 @@ class GemmRelated(COp):
#ifndef MOD
#define MOD
%
#endif
static double time_time() // a time function like time.perf_counter()
{
struct timeval tv;
gettimeofday(&tv, 0);
return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0;
}
void compute_strides(npy_intp *shape, int N_shape, int type_size, npy_intp *res) {
int s;
res[N_shape - 1] = type_size;
...
...
@@ -481,7 +474,7 @@ class GemmRelated(COp):
def
c_headers
(
self
,
**
kwargs
):
# std.cout doesn't require the '%' symbol to print stuff...
# so it works much better with python's string-substitution stuff.
return
[
"<iostream>"
,
"<time.h>"
,
"<sys/time.h>"
]
return
[
"<iostream>"
]
def
c_libraries
(
self
,
**
kwargs
):
return
ldflags
()
...
...
@@ -690,8 +683,6 @@ class GemmRelated(COp):
char N = 'N';
char T = 'T';
int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
//std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '
\\
n';
//double t0 = time_time();
switch(unit)
{
case 0x000: sgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y, &sy_0, x, &sx_0, &b, z, &sz_0); break;
...
...
@@ -704,7 +695,6 @@ class GemmRelated(COp):
case 0x111: sgemm_(&N, &N, &Nz0, &Nz1, &Nx1, &a, x, &sx_1, y, &sy_1, &b, z, &sz_1); break;
default: PyErr_SetString(PyExc_ValueError, "some matrix has no unit stride");
%(fail)
s;
};
//fprintf(stderr, "Calling sgemm
%%
i
%%
i
%%
i
%%
i took
%%
f
\\
n", unit, Nz1, Nz0, Nx1, time_time() - t0);
"""
case_double
=
"""
...
...
@@ -723,14 +713,6 @@ class GemmRelated(COp):
char N = 'N';
char T = 'T';
int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
//std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '
\\
n';
//double t0 = time_time();
//fprintf(stderr, "unit=
%%
x N=
%%
i
%%
i
%%
i S =
%%
i
%%
i
%%
i
%%
i
%%
i
%%
i
\\
n", unit,
//Nz1, Nz0, Nx1,
//sy_0, sy_1,
//sx_0, sx_1,
//sz_0, sz_1
//);
switch(unit)
{
case 0x000: dgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y,
...
...
@@ -753,8 +735,6 @@ class GemmRelated(COp):
"some matrix has no unit stride");
%(fail)
s;
};
//fprintf(stderr, "Calling dgemm
%%
i
%%
i
%%
i
%%
i took
%%
f
\\
n",
// unit, Nz1, Nz0, Nx1, time_time()- t0);
"""
end_switch_typenum
=
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论