Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JA: translation xla/developing_new_backend #854

Merged
merged 4 commits into from Sep 11, 2019
Merged

JA: translation xla/developing_new_backend #854

merged 4 commits into from Sep 11, 2019

Conversation

nuka137
Copy link
Contributor

@nuka137 nuka137 commented Jul 22, 2019

No description provided.

@tfdocsbot tfdocsbot added ja translation Community-provided translation for certain languages labels Jul 22, 2019
@tfdocsbot
Copy link
Collaborator

Reviewers added, please take a look.
@ohtaman, @sfujiwara, @masa-ita

When your review is finished, approve the pull request or include "LGTM" in your comment.

@googlebot googlebot added the cla: yes CLA has been signed label Jul 22, 2019

1. LLVMのバックエンドが存在するかしないかにかかわらず、公式にXLAでサポートされていない既存のCPUアーキテクチャ
2. LLVMのバックエンドが存在する、CPUではないハードウェア
3. LLVMのバックエンドが存在する、CPUではないハードウェア
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[strong suggestion]
存在する ==> 存在しない

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it.

GPUのバックエンドはCPUとは異なるISAをターゲットとするため、GPUドメイン固有なコードの生成方法になります。


## シナリオ3: LLVMのバックエンドが存在する、CPUではないハードウェア
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[strong suggestion]
存在する ==> 存在しない

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it.

## シナリオ1: 公式にXLAでサポートされていない既存のCPUアーキテクチャ

このシナリオの場合、既存の [XLA CPUバックエンド](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/xla/service/cpu) を見ることから始めてください。
XLAのCPUバックエンド間の主な違いは、LLVMによって生成されるコードであることから、XLAでは簡単にLLVMを使って異なるCPUをTensorFlowに対応できます。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[weak suggestion]
XLAでは簡単にLLVMを使って異なるCPUをTensorFlowに対応できます ==> XLAではLLVMを使って異なるCPUをTensorFlowに簡単に対応できます

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for a suggestion. I fixed it.


## シナリオ2: LLVMのバックエンドが存在する、CPUではないハードウェア

LLVM IRを出力する既存の [`xla::CPUCompiler`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/cpu/cpu_compiler.cc) や [`xla::GPUCompiler`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc) クラスをベースとして、新しい [`xla::Compiler`](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/compiler.h) を作ることが可能です。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[weak suggestion]
を作る ==> の実装を作る

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it.


よい参考例は、XLAの [GPUバックエンド](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/xla/service/gpu) です。
GPUのバックエンドはCPUとは異なるISAをターゲットとするため、GPUドメイン固有なコードの生成方法になります。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there no Japanese translation that corresponds to the following statement?

Other kinds of hardware, e.g. DSPs like Hexagon (which has an upstream LLVM backend), can reuse parts of the LLVM IR emission logic, but other parts will be unique.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. I forgot translating this line.
Newest commit includes its translation.

@nuka137
Copy link
Contributor Author

nuka137 commented Aug 25, 2019

@kiszk

Thanks for reviewing this translation.
I fixed all issues you mentioned.

@ohtaman @sfujiwara @masa-ita

Could you review this PR?

Copy link
Contributor

@sfujiwara sfujiwara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nuka137 Thank you for your translation and I'm very sorry for the late review. Your translation is great!

The below is the output of our proofreading tool:

developing_new_backend.md:46: ValidationError[SuggestExpression], Found invalid word "持つ". Use the synonym "もつ" instead. at line: 他の種類のハードウェア、例えば(アップストリームのLLVMのバックエンドを持つ)HexagonのようなDSPは、LLVM IRの生成論理部を再利用することができますが、他の部分は固有のものになるでしょう
developing_new_backend.md:46: ValidationError[SuggestExpression], Found invalid word "例え". Use the synonym "たとえ" instead. at line: 他の種類のハードウェア、例えば(アップストリームのLLVMのバックエンドを持つ)HexagonのようなDSPは、LLVM IRの生成論理部を再利用することができますが、他の部分は固有のものになるでしょう
developing_new_backend.md:46: ValidationError[SuggestExpression], Found invalid word "他の". Use the synonym "ほかの" instead. at line: 他の種類のハードウェア、例えば(アップストリームのLLVMのバックエンドを持つ)HexagonのようなDSPは、LLVM IRの生成論理部を再利用することができますが、他の部分は固有のものになるでしょう

In addition, please check my review comments!

本ガイドは1つ1つ丁寧に説明したものではなく、LLVM、Bazel、TensorFlowの知識を前提としています。

XLAは、新しいアーキテクチャやアクセラレータが、TensorFlowのグラフを処理するバックエンドを実装するための抽象的なインターフェースを提供します。
XLAに対応することはとても簡単で、かつ新しいハードウェア向けに既存のTensorFlowのオペレーションを実装することと比較して拡張性もあります。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not "simpler" and "scalable than implementing...", but "simpler and scalable" "than implementing...".
That is, for example, the below is natural:

XLA への対応は、新しいハードウェア向けに既存のすべての TensorFlow のオペレーションを実装するのと比べて遥かに簡潔でスケーラブルです。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion.
I think your translation is better than mine.


よい参考例は、XLAの [GPUバックエンド](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/compiler/xla/service/gpu) です。
GPUのバックエンドはCPUとは異なるISAをターゲットとするため、GPUドメイン固有なコードの生成方法になります。
他の種類のハードウェア、例えば(アップストリームのLLVMのバックエンドを持つ)HexagonのようなDSPは、LLVM IRの生成論理部を再利用することができますが、他の部分は固有のものになるでしょう
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[weak suggestion]
I guess 生成の仕組み is natural for a translation of emission logic.
But, I'm not familiar to this field.
If 生成論理 is used as a technical term in usual, we need not to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your translation is more natural than mine. I fixed it.

* [xla::Compiler](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/compiler.h): 本クラスは、HLO Computationから `xla::Executable` へのコンパイル処理を隠蔽します。
* [xla::Executable](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/executable.h): 本クラスは、コンパイル済みのComputationをプラットフォーム上で実行するために使用されます。
* [xla::TransferManager](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/xla/service/transfer_manager.h): 本クラスは、与えられたデバイスメモリのハンドルからXLAのリテラルデータを構築するための、プラットフォーム特有のしくみを提供することを可能にします。言い換えれば、ホストからデバイスまたはその反対のデータ転送処理を隠蔽します。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant line break.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed it.

@nuka137
Copy link
Contributor Author

nuka137 commented Sep 4, 2019

@sfujiwara

Thanks for reviewing.
I fixed all issues you mentioned.

Copy link
Contributor

@sfujiwara sfujiwara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tfdocsbot tfdocsbot added kokoro:force-run lgtm Community-added approval labels Sep 9, 2019
@sfujiwara
Copy link
Contributor

@nuka137 Thanks, great!!

@lamberta I approved this PR. Please merge it!

Copy link
Member

@lamberta lamberta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the translation and review!

@lamberta lamberta added the ready to pull Start merge process label Sep 11, 2019
TensorFlow-Docs-Copybara pushed a commit that referenced this pull request Sep 11, 2019
PiperOrigin-RevId: 268542862
@TensorFlow-Docs-Copybara TensorFlow-Docs-Copybara merged commit 767f9b4 into tensorflow:master Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA has been signed ja lgtm Community-added approval ready to pull Start merge process translation Community-provided translation for certain languages
Projects
None yet
8 participants