--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/3d81f133-8304-402d-8fff-4d5e68c776a6%40tensorflow.org.
Hi Uday,you should be able to change workspace.bzl to point to a different commit and even a different repository. You'll need to update LLVM_COMMIT, LLVM_SHA256 and eventually LLVM_URLS if you want a different repository. The LLVM_SHA256 should contain the sha256sum of the .tar.gz containing the LLVM code, just download the file yourself. This is exactly what "bump" commits do.
--Mehdi
Hi Uday,Bazel has the `new_local_repository` (see https://docs.bazel.build/versions/master/be/workspace.html#new_local_repository) which allows you to use a local directory as a repo.You will need to change the `tf_http_archive(name = "llvm-project",...)` section in tensorflow/workspace.bzel into new_local_repository, and add necessary BUILD files for llvm, mlir, and mlir/tests directory in your local llvm directory.
The BUILD files could be copied from the tensorflow repo (see `tf_http_archive(name = "llvm-project"...)`).ThanksYong
On Monday, May 25, 2020 at 11:08:55 AM UTC-7, Uday Bondhugula wrote:
On Monday, May 25, 2020 at 11:13:28 PM UTC+5:30, Mehdi AMINI wrote:On Mon, May 25, 2020 at 8:06 AM Uday Kumar Reddy Bondhugula <ud...@polymagelabs.com> wrote:Hi Alex,On Mon, 25 May 2020 at 20:20, 'Alex Zinenko' via MLIR <ml...@tensorflow.org> wrote:Hi Uday,you should be able to change workspace.bzl to point to a different commit and even a different repository. You'll need to update LLVM_COMMIT, LLVM_SHA256 and eventually LLVM_URLS if you want a different repository. The LLVM_SHA256 should contain the sha256sum of the .tar.gz containing the LLVM code, just download the file yourself. This is exactly what "bump" commits do.Thanks, but this way, if you are working on a tree to update LLVM/MLIR the way it's needed, you'd have to keep pushing it to the repo, update commit ID/hash and the bazel build will download/untar/rebuild (I hope the compilation cache helps here - it's otherwise impractical in the dev cycle). But would there be a way to avoid this roundtrip overhead and do this update/rebuild locally? Perhaps by not using a tf_http_archive but setting it up to use something local?Can you try --override_repository=llvm-project=<path> ?Thanks very much - this is almost perfect except that another tree won't work without the WORKSPACE and BUILD files that tensorflow/workspace.bzl is specifying. This can be circumvented though by first copying the tree out from the bazel cache and then basing changes on that, and then doing using the override you suggest. bazel build does correctly build by using files from this override.- Uday--Mehdi
--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/f6e49d8c-3077-45fc-a5e1-102817fa396c%40tensorflow.org.
Hey Yong,On Mon, May 25, 2020 at 8:46 PM Yong Tang <yong.tan...@outlook.com> wrote:Hi Uday,Bazel has the `new_local_repository` (see https://docs.bazel.build/versions/master/be/workspace.html#new_local_repository) which allows you to use a local directory as a repo.You will need to change the `tf_http_archive(name = "llvm-project",...)` section in tensorflow/workspace.bzel into new_local_repository, and add necessary BUILD files for llvm, mlir, and mlir/tests directory in your local llvm directory.Is there a practical advantage to modify the workspace to us local_repository instead of using `--override_repository=llvm-project=<path>` on the command line? (I'm no bazel expert, so curious about it)
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/CANF-O%3DYery_km7tBw0%3DM9NM2FUhvw%3DJFiL%2Bb8T_Dn2zYsKDcKA%40mail.gmail.com.
On Tue, 26 May 2020 at 09:29, Mehdi AMINI <joke...@gmail.com> wrote:Hey Yong,On Mon, May 25, 2020 at 8:46 PM Yong Tang <yong.tan...@outlook.com> wrote:Hi Uday,Bazel has the `new_local_repository` (see https://docs.bazel.build/versions/master/be/workspace.html#new_local_repository) which allows you to use a local directory as a repo.You will need to change the `tf_http_archive(name = "llvm-project",...)` section in tensorflow/workspace.bzel into new_local_repository, and add necessary BUILD files for llvm, mlir, and mlir/tests directory in your local llvm directory.Is there a practical advantage to modify the workspace to us local_repository instead of using `--override_repository=llvm-project=<path>` on the command line? (I'm no bazel expert, so curious about it)Thanks, Yong! It's perhaps a recent feature. I have bazel 3.0.0, and new_local_repository isn't supported (error below). But it looks like that would work as well without needing a cmd-line override. The caveat is that removing tf_http_archive would mean that part wouldn't get updated during subsequent upstream pulls, and will have to be manually adjusted in case the vanilla repo is to be tried.----------------...ERROR: /data/tensorflow/tensorflow/workspace.bzl:676:5: name 'new_local_repository' is not defined
ERROR: error loading package '': Extension 'tensorflow/workspace.bzl' has errors...
On Mon, May 25, 2020 at 9:40 PM Uday Kumar Reddy Bondhugula <ud...@polymagelabs.com> wrote:On Tue, 26 May 2020 at 09:29, Mehdi AMINI <joke...@gmail.com> wrote:Hey Yong,On Mon, May 25, 2020 at 8:46 PM Yong Tang <yong.ta...@outlook.com> wrote:Hi Uday,Bazel has the `new_local_repository` (see https://docs.bazel.build/versions/master/be/workspace.html#new_local_repository) which allows you to use a local directory as a repo.You will need to change the `tf_http_archive(name = "llvm-project",...)` section in tensorflow/workspace.bzel into new_local_repository, and add necessary BUILD files for llvm, mlir, and mlir/tests directory in your local llvm directory.Is there a practical advantage to modify the workspace to us local_repository instead of using `--override_repository=llvm-project=<path>` on the command line? (I'm no bazel expert, so curious about it)Thanks, Yong! It's perhaps a recent feature. I have bazel 3.0.0, and new_local_repository isn't supported (error below). But it looks like that would work as well without needing a cmd-line override. The caveat is that removing tf_http_archive would mean that part wouldn't get updated during subsequent upstream pulls, and will have to be manually adjusted in case the vanilla repo is to be tried.----------------...ERROR: /data/tensorflow/tensorflow/workspace.bzl:676:5: name 'new_local_repository' is not defined
ERROR: error loading package '': Extension 'tensorflow/workspace.bzl' has errors...I think you need to use `native.` as a prefix: so `native.new_local_repository` (don't ask me why :))
--Mehdi- Uday--Mehdi
--The BUILD files could be copied from the tensorflow repo (see `tf_http_archive(name = "llvm-project"...)`).ThanksYong
On Monday, May 25, 2020 at 11:08:55 AM UTC-7, Uday Bondhugula wrote:
On Monday, May 25, 2020 at 11:13:28 PM UTC+5:30, Mehdi AMINI wrote:On Mon, May 25, 2020 at 8:06 AM Uday Kumar Reddy Bondhugula <ud...@polymagelabs.com> wrote:Hi Alex,On Mon, 25 May 2020 at 20:20, 'Alex Zinenko' via MLIR <ml...@tensorflow.org> wrote:Hi Uday,you should be able to change workspace.bzl to point to a different commit and even a different repository. You'll need to update LLVM_COMMIT, LLVM_SHA256 and eventually LLVM_URLS if you want a different repository. The LLVM_SHA256 should contain the sha256sum of the .tar.gz containing the LLVM code, just download the file yourself. This is exactly what "bump" commits do.Thanks, but this way, if you are working on a tree to update LLVM/MLIR the way it's needed, you'd have to keep pushing it to the repo, update commit ID/hash and the bazel build will download/untar/rebuild (I hope the compilation cache helps here - it's otherwise impractical in the dev cycle). But would there be a way to avoid this roundtrip overhead and do this update/rebuild locally? Perhaps by not using a tf_http_archive but setting it up to use something local?Can you try --override_repository=llvm-project=<path> ?Thanks very much - this is almost perfect except that another tree won't work without the WORKSPACE and BUILD files that tensorflow/workspace.bzl is specifying. This can be circumvented though by first copying the tree out from the bazel cache and then basing changes on that, and then doing using the override you suggest. bazel build does correctly build by using files from this override.- Uday--Mehdi
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/f6e49d8c-3077-45fc-a5e1-102817fa396c%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ml...@tensorflow.org.
Ah that might be because the new_repository is supposed to be used in WORKSPACE file, but tensorflow places llvm repo inside tensorflow/workspace.bzl and load the def from workspace. In Bazel the bzl file's behavior is different from workspace file (I don't know exactly the difference). I think if you place the repo declaration in WORKSPACE file, similar to `http_archive(name = "speech_commands",` then it will work.