Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5582a715
提交
5582a715
authored
6月 14, 2017
作者:
Adam Becker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
topk gpu bug fixes
- fixed gpu indexing error in small kernel - make RadixType at least 32 bits
上级
7072d479
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
9 行删除
+8
-9
k_topk_common.cuh
theano/gpuarray/k_topk_common.cuh
+6
-6
k_topk_dense.cu
theano/gpuarray/k_topk_dense.cu
+2
-3
没有找到文件。
theano/gpuarray/k_topk_common.cuh
浏览文件 @
5582a715
...
...
@@ -126,13 +126,13 @@ struct RadixConfig {
// We use this to enable radix selection of floating-point values.
// This also gives a relative order for NaNs, but that's ok, as they
// will all be adjacent
typedef
T
RadixType;
typedef
ga_uint
RadixType;
static inline __device__ RadixType convert(T v) {
return v;
return
(RadixType)
v;
}
static inline __device__ float deconvert(RadixType v) {
return v;
return
(T)
v;
}
};
...
...
@@ -173,7 +173,7 @@ struct RadixConfig<ga_double> {
template <>
struct RadixConfig<ga_byte> {
typedef ga_u
byte
RadixType;
typedef ga_u
int
RadixType;
static inline __device__ RadixType convert(ga_byte v) {
return 128u + v;
...
...
@@ -186,7 +186,7 @@ struct RadixConfig<ga_byte> {
template <>
struct RadixConfig<ga_short> {
typedef ga_u
shor
t RadixType;
typedef ga_u
in
t RadixType;
static inline __device__ RadixType convert(ga_short v) {
assert(sizeof(ga_short) == 2);
...
...
@@ -232,7 +232,7 @@ struct RadixConfig<ga_long> {
// since ga_half is ushort, use macro to protect this part is necessary
template <>
struct RadixConfig<ga_half> {
typedef ga_u
shor
t RadixType;
typedef ga_u
in
t RadixType;
static inline __device__ RadixType convert(ga_half v) {
RadixType mask = -(((RadixType)v >> 15)) | 0x8000;
...
...
theano/gpuarray/k_topk_dense.cu
浏览文件 @
5582a715
...
...
@@ -100,10 +100,9 @@ KERNEL void k_topk_dense(
if (idx==0) {
#pragma unroll
for (int bin=RADIX_SIZE-1; bin>=0; --bin) {
if (smem[bin] <= 0) {
k2 = -smem[bin];
if (smem[bin] <= 0)
break;
}
k2 = smem[bin];
}
}
local_barrier();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论