TensorFlow XLA加速线性代数编译器

  • 内容
  • 评论
  • 相关

加速线性代数器(Accelerated linear algebra,XLA)是线性代数领域的专用编译器。根据 https://www.tensorflow.org/performance/xla/,它仍处于实验阶段,用于优化 TensorFlow 计算。

XLA 可以提高服务器和移动平台的执行速度、内存使用率和可移植性。它提供了双向 JIT(Just In Time)编译或 AoT(Ahead of Time)编译。使用 XLA,你可以生成平台相关的二进制文件(针对大量平台,如 x64、ARM等),可以针对内存和速度进行优化。

准备工作

目前,XLA 并不包含在 TensorFlow 的二进制版本中。用时需要从源代码构建它。

从源代码构建 TensorFlow,需要 TensorFlow 版的 LLVM 和 Bazel。TensorFlow.org 仅支持从 macOS 和 Ubuntu 的源代码构建。从源代码构建 TensorFlow 所需的步骤如下(参见https://www.tensorflow.org/install/install_sources):

  1. 确定要安装哪个版本的 TensorFlow——仅支持 CPU 的 TensorFlow 或支持 GPU 的 TensorFlow。
  2. 复制 TensorFlow 存储库:



     

本文标题:TensorFlow XLA加速线性代数编译器

本文地址:https://www.hosteonscn.com/4205.html

评论

0条评论

发表评论

邮箱地址不会被公开。 必填项已用*标注