kumitatepazuru's blog

中学生のメモブログ。みんなの役に立ちたい。

tensorflowのconfigureの意味まとめ

最近、tensorflowを高速化するためにコンパイルをしてインストールしようと思った。

その時に、configureファイルを実行するはずだが、そこに書いてある専門用語がちょっと何言ってるかわからない状態だったので、説明。 ちなみに、これは自分がconfigureを実行しようとした時に出てきた物をまとめたものなので他にもあるかもしれない。その時はコメントで教えて。

実際の表示文 専門用語 意味
Please specify the location of python. なし そのまま。pythonディレクトリを設定する。デフォルトで、tensorflowが見つけたpythonになる。
Please input the desired Python library path to use. なし そのまま。pythonディレクトリを変更したときのsite-packagesディレクトリを設定する。普通は自動で検知されるので、変更しない。
Do you wish to build TensorFlow with ROCm support? ROCm ROCmはnvidiaのCUDAのAMD版的なやつ。普通はいらないのでN
Do you wish to build TensorFlow with CUDA support? CUDA nvidiaGPUを使用するために必要。自分は一応Y
Do you wish to build TensorFlow with TensorRT support? TensorRT nvidiaのやつみたい。よくわからないので自分はN
わかる方は、コメントで教えてくれると嬉しかったりします。
developer.nvidia.com
Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 10] なし CUDAのところをYにした時に表示される。自分はバージョンが10なのでそのままEnter。
Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7] なし cuDNNも7なのでそのままEnter。
Please specify the locally installed NCCL version you want to use. [Leave empty to use http://github.com/nvidia/nccl] NCCL なんかよくわかんないけど早くなるらしい。そのままEnter。
developer.nvidia.com
github.com
Please specify the comma-separated list of base paths to look for CUDA libraries and headers. なし そのまま。普通は空白でOK。
もし、このあとに、CUDAのバージョン指定に戻されるなら、上の方に、足りないファイル名が書いてあるのでそれを探して、もう一度、この質問の時に指定する。
例: Could not find any cublas_api.h matching version '' in any subdirectory
Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 6.1]
いろいろ 明示されているhttps://developer.nvidia.com/cuda-gpusから、計算能力の数字を調べて入力するっぽい。自分は、1050Tiだったが、乗っていなかったので1050の数字を入力した。
Do you want to use clang as CUDA compiler? なし clangは使わないのでN
Please specify which gcc should be used by nvcc as the host compiler. なし コンパイラのパスを指定。そのままで大丈夫。
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified なし これはそのままでいいと思う。
Would you like to interactively configure ./WORKSPACE for Android builds? なし androidは使用しないのでN

これで終わり。あとはビルドして完成。

GCEのping一覧と値段表

お久しぶりです。今日は、最近良く使うGCEのリージョン選びに迷ったのでメモを残しておきます。誰かの助けになれば幸いです。

一応ping200ms以上は載せていません。また、インスタンスE2e2-mediumの1ヶ月の通常料金にしています。

オレゴン: 121ms $24.46
アイオワ: 155ms $24.46
台湾: 59ms $28.32
ムンバイ: 188ms $29.38
シンガポール: 110ms $30.17
東京: 26ms $31.38
大阪: 32ms $31.38
ソウル: 56ms $31.38
香港: 71ms $34.22
シドニー: 186ms $34.7

順番は、値段重視のコスパ良いものを選んでいます。