Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
3c332e72
提交
3c332e72
authored
10月 07, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the blas ops for real this time ...
上级
452e9c92
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
10 行增加
和
3 行删除
+10
-3
blas.py
theano/sandbox/gpuarray/blas.py
+10
-3
没有找到文件。
theano/sandbox/gpuarray/blas.py
浏览文件 @
3c332e72
import
os.path
import
os.path
from
theano
import
Apply
,
config
from
theano
import
Apply
,
config
,
Op
from
theano.compile
import
optdb
from
theano.compile
import
optdb
from
theano.gof
import
LocalOptGroup
from
theano.gof
import
LocalOptGroup
from
theano.tensor.basic
import
as_tensor_variable
from
theano.tensor.basic
import
as_tensor_variable
from
theano.tensor.opt
import
in2out
from
theano.tensor.opt
import
in2out
from
.basic_ops
import
HideC
,
as_gpuarray_variable
,
infer_context_name
from
.basic_ops
import
as_gpuarray_variable
,
infer_context_name
from
.opt_util
import
inplace_allocempty
from
.opt_util
import
inplace_allocempty
...
@@ -19,7 +19,7 @@ except ImportError as e:
...
@@ -19,7 +19,7 @@ except ImportError as e:
pass
pass
class
BlasOp
(
HideC
):
class
BlasOp
(
Op
):
def
c_headers
(
self
):
def
c_headers
(
self
):
return
[
'<blas_api.h>'
,
'<numpy_compat.h>'
,
'<gpuarray_helper.h>'
]
return
[
'<blas_api.h>'
,
'<numpy_compat.h>'
,
'<gpuarray_helper.h>'
]
...
@@ -31,6 +31,8 @@ class BlasOp(HideC):
...
@@ -31,6 +31,8 @@ class BlasOp(HideC):
class
GpuGemv
(
BlasOp
):
class
GpuGemv
(
BlasOp
):
__props__
=
(
'inplace'
,)
def
__init__
(
self
,
inplace
=
False
):
def
__init__
(
self
,
inplace
=
False
):
self
.
inplace
=
inplace
self
.
inplace
=
inplace
if
self
.
inplace
:
if
self
.
inplace
:
...
@@ -107,6 +109,7 @@ gpugemv_inplace = GpuGemv(inplace=True)
...
@@ -107,6 +109,7 @@ gpugemv_inplace = GpuGemv(inplace=True)
class
GpuGemm
(
BlasOp
):
class
GpuGemm
(
BlasOp
):
__props__
=
(
'inplace'
,)
_f16_ok
=
True
_f16_ok
=
True
def
__init__
(
self
,
inplace
=
False
):
def
__init__
(
self
,
inplace
=
False
):
...
@@ -185,6 +188,8 @@ gpugemm_inplace = GpuGemm(inplace=True)
...
@@ -185,6 +188,8 @@ gpugemm_inplace = GpuGemm(inplace=True)
class
GpuGer
(
BlasOp
):
class
GpuGer
(
BlasOp
):
__props__
=
(
'inplace'
,)
def
__init__
(
self
,
inplace
=
False
):
def
__init__
(
self
,
inplace
=
False
):
self
.
inplace
=
inplace
self
.
inplace
=
inplace
if
self
.
inplace
:
if
self
.
inplace
:
...
@@ -256,6 +261,8 @@ gpuger_inplace = GpuGer(inplace=True)
...
@@ -256,6 +261,8 @@ gpuger_inplace = GpuGer(inplace=True)
class
GpuDot22
(
BlasOp
):
class
GpuDot22
(
BlasOp
):
__props__
=
()
def
make_node
(
self
,
x
,
y
):
def
make_node
(
self
,
x
,
y
):
ctx_name
=
infer_context_name
(
x
,
y
)
ctx_name
=
infer_context_name
(
x
,
y
)
x
=
as_gpuarray_variable
(
x
,
ctx_name
)
x
=
as_gpuarray_variable
(
x
,
ctx_name
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论