使用 Keras &带有 AMD GPU 的 Tensorflow [英] Using Keras & Tensorflow with AMD GPU

查看:39
本文介绍了使用 Keras &带有 AMD GPU 的 Tensorflow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始学习 Keras,我相信它是在 Tensorflow 和 Theano 之上的一层.但是,我只能使用 AMD GPU,例如 AMD R9 280X.

I'm starting to learn Keras, which I believe is a layer on top of Tensorflow and Theano. However, I only have access to AMD GPUs such as the AMD R9 280X.

如何设置我的 Python 环境,以便我可以通过 Keras/Tensorflow 对 OpenCL 的支持来使用我的 AMD GPU?

How can I setup my Python environment such that I can make use of my AMD GPUs through Keras/Tensorflow support for OpenCL?

我在 OSX 上运行.

I'm running on OSX.

推荐答案

我正在 https://github.com/hughperkins/tensorflow-cl

这个用于 OpenCL 的 tensorflow 分支具有以下特点:

This fork of tensorflow for OpenCL has the following characteristics:

  • 它针对任何/所有 OpenCL 1.2 设备.它不需要 OpenCL 2.0,不需要 SPIR-V 或 SPIR.不需要共享虚拟内存.等等......
  • 它基于名为cuda-on-cl"的底层库,https://github.com/hughperkins/cuda-on-cl
    • cuda-on-cl 的目标是能够采用任何 NVIDIA® CUDA™ 源代码,并为 OpenCL 1.2 设备编译它.这是一个非常通用的目标,也是一个非常通用的编译器
    • it targets any/all OpenCL 1.2 devices. It doesnt need OpenCL 2.0, doesnt need SPIR-V, or SPIR. Doesnt need Shared Virtual Memory. And so on ...
    • it's based on an underlying library called 'cuda-on-cl', https://github.com/hughperkins/cuda-on-cl
      • cuda-on-cl targets to be able to take any NVIDIA® CUDA™ soure-code, and compile it for OpenCL 1.2 devices. It's a very general goal, and a very general compiler

      这不是 Tensorflow 唯一可用的 OpenCL 分支.还有一个由 Codeplay https://www.codeplay.com 开发的分支,使用 Computecpp,https://www.codeplay.com/products/computesuite/computecpp 他们的 fork 比我的要求更高据我所知,它在哪些特定的 GPU 设备上工作.您需要查看平台支持说明(位于 hte computecpp 页面底部),以确定您的设备是否受支持.codeplay fork其实是谷歌官方的fork,在这里:https://github.com/benoitsteiner/tensorflow-opencl

      This is not the only OpenCL fork of Tensorflow available. There is also a fork being developed by Codeplay https://www.codeplay.com , using Computecpp, https://www.codeplay.com/products/computesuite/computecpp Their fork has stronger requirements than my own, as far as I know, in terms of which specific GPU devices it works on. You would need to check the Platform Support Notes (at the bottom of hte computecpp page), to determine whether your device is supported. The codeplay fork is actually an official Google fork, which is here: https://github.com/benoitsteiner/tensorflow-opencl

      这篇关于使用 Keras &带有 AMD GPU 的 Tensorflow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆