Unable to set the backend to opencl

未关闭
#230 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
backend

调研方向

复现 Python import 和 af.set_backend('opencl') 序列,然后检查第 658 行 set_backend 附近的 arrayfire/library.py 以及 backend 加载路径。将 Python 的行为与报告中的 ArrayFire.jl OpenCL 加载进行比较;当 Python 序列不再引发报告中的 RuntimeError 且有 regression test 覆盖该问题时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

I use the following driver for my card with mesa-opencl-icd loader and radeon driver.

0d:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile] (rev 83)
	Subsystem: Hewlett-Packard Company Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / Radeon 520 Mobile]

Installed Arrayfire and made sure that all the libraries are loaded. Using the ArrayFire.jl, arrayfire loads in Julia perfectly and runs on my AMD card.

ArrayFire v3.7.1 (OpenCL, 64-bit Linux, build d9d9b65)
[0] Clover: AMD HAINAN (DRM 2.50.0, 5.4.0-33-generic, LLVM 9.0.1), 2048 MB

But, in my Python the array fire loads with the following info:

ArrayFire v3.7.1 (CPU, 64-bit Linux, build d9d9b65)
[0] Intel: Intel(R) Core(TM) i3-5010U CPU @ 2.10GHz

I also use the following in my .bashrc to update my environment:

export LD_LIBRARY_PATH=/opt/arrayfire/lib64:$LD_LIBRARY_PATH

When I try to change the backend, I get the following error:

>>> af.set_backend('opencl')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/saipavanchitta/.local/lib/python3.8/site-packages/arrayfire/library.py", line 658, in set_backend
    raise RuntimeError("Can not change backend to %s after loading %s" % (name, backend.name()))
RuntimeError: Can not change backend to opencl after loading cpu

Is there something that I am missing?

主要语言
Python
星标
422
派生
63
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

arrayfire/arrayfire-python 的其他 Issue

查看 arrayfire/arrayfire-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。