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
Conversation
Reviewers added, please take a look. When your review is finished, approve the pull request or include "LGTM" in your comment. |
|
||
1. LLVMのバックエンドが存在するかしないかにかかわらず、公式にXLAでサポートされていない既存のCPUアーキテクチャ | ||
2. LLVMのバックエンドが存在する、CPUではないハードウェア | ||
3. LLVMのバックエンドが存在する、CPUではないハードウェア |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[strong suggestion]
存在する
==> 存在しない
There was a problem hiding this comment.
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ではないハードウェア |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[strong suggestion]
存在する
==> 存在しない
There was a problem hiding this comment.
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に対応できます。 |
There was a problem hiding this comment.
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に簡単に対応できます
There was a problem hiding this comment.
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) を作ることが可能です。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[weak suggestion]
を作る
==> の実装を作る
There was a problem hiding this comment.
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ドメイン固有なコードの生成方法になります。 | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for reviewing this translation. Could you review this PR? |
There was a problem hiding this 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のオペレーションを実装することと比較して拡張性もあります。 |
There was a problem hiding this comment.
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 のオペレーションを実装するのと比べて遥かに簡潔でスケーラブルです。
There was a problem hiding this comment.
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の生成論理部を再利用することができますが、他の部分は固有のものになるでしょう |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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のリテラルデータを構築するための、プラットフォーム特有のしくみを提供することを可能にします。言い換えれば、ホストからデバイスまたはその反対のデータ転送処理を隠蔽します。 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant line break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it.
Thanks for reviewing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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!
PiperOrigin-RevId: 268542862
No description provided.