【转载】Spark的GPU支持方法研究

本文转载自:https://my.oschina.net/u/2306127/blog/1602291

这包括几个层次:

  • GPU直接支持Spark。因为Spark是多线程的,而GPU往往只能起一个单例,导致线程会竞争GPU资源,需要进行管理、加锁和调度。方法包括:
    • 原生代码内置编译支持。
    • 引入cuDNN等NVidia库进行调用。
    • 通过Tensorflow等间接进行支持。
    • JIT方式即时编译调用方式支持。
  • GPU支持的Docker中运行Spark。如果将Spark节点放入Docker容器中运行,则需要使用NVidia提供的特殊版本Docker,而且需要安装NVidai提供的cuDNN等软件支持库。由于这些库调用了系统驱动,而且是C++编写,因此Spark要能够进行系统库的调用。
  • GPU支持的Kubernetes之上运行Spark。
    • 在上面的基础上,支持GPU的Docker容器需要能够接受Kubernetes的管理和调度。
    • 参考:https://my.oschina.net/u/2306127/blog/1808304

只有同时满足上面的条件,才能通过Kubernetes的集群管理对Docker中Spark进行GPU操作。

下面是已经做的一些研究。

  • IBMSparkGPU的方案可以将GPU用于RDD和DataFrame,支持通用计算,重点支持机器学习;
  • deeplearning4j是基于Java的,包含数值计算和神经网络,支持GPU;
  • NUMBA的方案通过PySpark即时编译产生GPU的调用代码,兼容性好;
  • Tensorflow/Caffe/MXNet等与Spark整合主要是节点调度,GPU由深度学习引擎调度,RDD需要数据交换,主要用于存储中间超参数数据。如TensorFrame的实现-https://github.com/databricks/tensorframes

具体的资源包括:

  • https://github.com/databricks/spark-deep-learning,Deep Learning Pipelines for Apache Spark,直接支持Images的一些功能。
  • http://www.spark.tc/simd-and-gpu/, Spark多种支持GPU方法。
  • http://www.spark.tc/gpu-acceleration-on-apache-spark-2/,GPU扩展
  • https://my.oschina.net/u/2306127/blog/1602295,同上。
  • http://www.spark.tc/0-to-life-changing-app-new-apache-systemml-api-on-spark-shell/,systemML在Spark中使用。
  • Continuum-Anaconda,NUMBA: A PYTHON JIT COMPILER,http://on-demand.gputechconf.com/gtc/2016/presentation/s6413-stanley-seibert-apache-spark-python.pdf
  • http://spark.tc/why-you-should-be-using-apache-systemml-2/,关于SystemML。
  • 基于Java的神经网络深度学习系列库(支持GPU,https://deeplearning4j.org/),https://github.com/deeplearning4j
  • https://github.com/IBMSparkGPU,源码:https://github.com/IBMSparkGPU/GPUEnabler
  • Spark Summit 2016 Talk by Jun Feng Liu (IBM) and Yonggang Hu (IBM)
    • https://databricks.com/session/gpu-support-in-spark-and-gpu-cpu-mixed-resource-scheduling-at-production-scale
    • https://www.slideshare.net/SparkSummit/gpu-support-in-spark-and-gpucpu-mixed-resource-scheduling-at-production-scale-63065895
  • Hadoop, Spark, Deep Learning Mesh on Single GPU Cluster,https://www.nextplatform.com/2016/02/24/hadoop-spark-deep-learning-mesh-on-single-gpu-cluster/
  • IBM,关于GPU RDD的讨论,http://on-demand.gputechconf.com/gtc/2016/presentation/s6280-rajesh-bordawekar-accelerating-spark.pdf
  • GPU Computing with Apache Spark and Python,http://on-demand.gputechconf.com/gtc/2016/presentation/s6413-stanley-seibert-apache-spark-python.pdf
  • Spark ML Runs 10x Faster on GPUs, Databricks Says。https://www.datanami.com/2016/10/27/spark-ml-runs-faster-gpus/

你可能感兴趣的:(【转载】Spark的GPU支持方法研究)