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

查看:196
本文介绍了使用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环境,以便可以通过对OpenCL的Keras/Tensorflow支持来使用我的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上运行.

推荐答案

我正在 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
      • per-element operations, using Eigen over OpenCL, (more info at https://bitbucket.org/hughperkins/eigen/src/eigen-cl/unsupported/test/cuda-on-cl/?at=eigen-cl )
      • blas / matrix-multiplication, using Cedric Nugteren's CLBlast https://github.com/cnugteren/CLBlast
      • reductions, argmin, argmax, again using Eigen, as per earlier info and links
      • learning, trainers, gradients. At least, StochasticGradientDescent trainer is working, and the others are commited, but not yet tested

      这不是Tensorflow可用的唯一OpenCL分支. Codeplay https://www.codeplay.com 还在使用Computecpp, https://www.codeplay.com/products/computesuite/computecpp 他们的叉子比我的叉子有更强的要求据我所知,它在哪种特定的GPU设备上工作.您需要查看平台支持说明(在htecomputecpp页面底部),以确定是否支持您的设备.编解码叉子实际上是Google的官方叉子,位于这里: 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天全站免登陆