dtype: NotImplementedError: float16
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 sparse/coo/common.py 中的 _dot_coo_coo_type 开始,使用 np.float16 或 np.int8 重现报告中的 sparse.COO 和 sparse.dot 操作序列。检查 dtype 如何传递到 Numba helper;当报告中的 dot 操作对于所请求的 dtype 不再引发 NotImplementedError 时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hello, I am trying to reduce the memory footprint of the matrices containing small integers, and want to set the dtype to np.int8 or np.float16.
import sparse
import numpy as np
x=sparse.COO(np.random.rand(5*10**2, 5*10**2)).astype(np.float16)
y = sparse.dot(x,x)
z = sparse.dot(y,y)
This is the error I get:
myenvpath/lib/python3.6/site-packages/sparse/coo/common.py in _dot_coo_coo_type(dt1, dt2)
1208
1209 @numba.jit(nopython=True, nogil=True,
-> 1210 locals={'data_curr': numba.numpy_support.from_dtype(dtr)})
1211 def _dot_coo_coo(coords1, data1, coords2, data2): # pragma: no cover
1212 """
myenvpath/lib/python3.6/site-packages/numba/numpy_support.py in from_dtype(dtype)
106 return types.NestedArray(subtype, dtype.shape)
107
--> 108 raise NotImplementedError(dtype)
109
110
NotImplementedError: float16
- 主要语言
- Python
- 星标
- 670
- 派生
- 167
- 平均合并
- 3 天 4 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pydata/sparse 的其他 Issue
-
Bug: full einsum contractions upcast the dtype and count booleans可能已有人在做 @RaphaelFakhri 于 17 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
BUG: ufunc outer rejects Python scalar and sequence operands可能已有人在做 @nawaaaaaAaar 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
Bug: slices with a negative step and a negative stop return wrong elements可能已有人在做 @JoeyTan21 于 19 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 75/100
维护者通常 2 天内回复
-
BUG: matmul fails with zero-length broadcast batch dimensions可能已有人在做 @nawaaaaaAaar 于 29 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 40/100
维护者通常 2 天内回复
-
BUG: zero-length tensor contractions ignore requested output types可能已有人在做 @nawaaaaaAaar 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
needs-triage
难度 1/5 1 小时以内 新手友好度 88/100
flashinfer-ai/flashinfer#9803 ·
维护者通常 1 天内回复
-
bug frontend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
难度 2/5 1-3 小时 新手友好度 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
难度 1/5 1 小时以内 新手友好度 89/100
cuadrao-ai/argus#2328 ·
维护者通常 1 天内回复
-
bug frontend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
nikhilb2/simple_invoicing#907 ·