Skip to content

(//bazel): Native compilation support for Jetson AGX platform #113

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

Closed
wants to merge 38 commits into from

Conversation

andi4191
Copy link
Contributor

@andi4191 andi4191 commented Jun 24, 2020

Description

It includes native compilation support for NVIDIA Jetson AGX platform.

Dependencies:
Cross-compiled libraries from PyTorch on Jetson. Refer https://ngc.nvidia.com/catalog/containers/nvidia:l4t-pytorch

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

  • Breaking change (x86_64 bazel system needs to adapt and co-exist with aarch64 support)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation and have regenerated the documentation (make html in docsrc)
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes

@andi4191 andi4191 requested a review from narendasan June 24, 2020 20:22
@andi4191 andi4191 self-assigned this Jun 24, 2020
@andi4191 andi4191 changed the title Anuragd/aarch64 jetpack WIP: (//bazel): Native compilation support for Jetson AGX platform Jun 24, 2020
Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

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

We need to find a way to elegantly integrate these changes so that it doesn't wildly increase complexity or introduce confusion. We might be able to do some work with select in the BUILD file of the dependencies, this might get us around having 4 cases in every BUILD file. Also can you run all this through buildifier (https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md)? there are quite a few formatting issues

| Linux aarch64 / GPU | **Planned/Possible with Native Compiation but untested** |
| Linux aarch64 / DLA | **Planned/Possible with Native Compilation but untested** |
| Linux aarch64 / GPU | **Native Compilation Supported on JetPack-4.4** |
| Linux aarch64 / DLA | **Native Compilation Supported on JetPack-4.4 but untested** |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you try resnet 50 on DLA with trtorchc?

@narendasan
Copy link
Collaborator

Also we need to change the sphinx documentation to document the new usage for aarch64 (//docsrc/tutorials/installation.rst)

@narendasan narendasan marked this pull request as draft June 24, 2020 21:09
@narendasan
Copy link
Collaborator

Closes #36

@narendasan narendasan added this to the v0.1.0 milestone Jun 26, 2020
@narendasan narendasan added the component: build system Issues re: Build system label Jun 26, 2020
abhi-iyer added 20 commits July 2, 2020 14:29
…nd bilinear2d ops

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…ilinear ops. removed redundant tests

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…late plugin

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…ompiles now. time to test it.

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Added support for interpolate plugin, used when align_corners=False and mode is linear
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…plugin, works for mode='linear'

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
… sized tensors

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…ut tensors

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
…r adaptive_pool2d

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
narendasan and others added 11 commits July 2, 2020 14:29
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
… support for aten::select.int

Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
Signed-off-by: Abhiram Iyer <[email protected]>

Signed-off-by: Abhiram Iyer <[email protected]>
@narendasan narendasan linked an issue Jul 6, 2020 that may be closed by this pull request
Anurag Dixit and others added 5 commits July 6, 2020 12:13
Signed-off-by: Anurag Dixit <[email protected]>
Signed-off-by: Anurag Dixit <[email protected]>
cuBLAS into its own dependency should follow the same workflow as CUDA
(i.e. local only)

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
The issue was in //third_party/libtorch/BUILD, there was numpy libraries
being picked as headers.

Also significantly simplifies the build system to only using the
cpu flag for configuring precompiled third party dependecies and also removes
the pre_cxx11_abi_aarch64 flag.

Streamlines WORKSPACE, deduplicating repositories. Now the user workflow
for aarch64 compilation is to configure the WORKSPACE to use all local
sources. These should be able to be used the same way on x86_64

Also discovered that the NVIDIA PyTorch distribution for aarch64 uses
the CXX11 abi so default paths for both will point to the default torch
install location for local.

TODO: Move from cpu to platforms (@andi4191)
TODO: Test on both x86 and aarch64 + DLA (@andi4191)
TODO: Before merge reset the WORKSPACE file to the default settings

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
@andi4191 andi4191 force-pushed the anuragd/aarch64-jetpack branch from 5e2c081 to 199caa1 Compare July 6, 2020 20:01
@andi4191 andi4191 changed the title WIP: (//bazel): Native compilation support for Jetson AGX platform (//bazel): Native compilation support for Jetson AGX platform Jul 6, 2020
@andi4191 andi4191 force-pushed the anuragd/aarch64-jetpack branch from 199caa1 to 813289f Compare July 6, 2020 20:05
@narendasan narendasan marked this pull request as ready for review July 6, 2020 21:50
@andi4191 andi4191 requested a review from narendasan July 7, 2020 01:33
@narendasan
Copy link
Collaborator

@andi4191 can you rebase this on master the PR? is trying to recommit a bunch of old changes

@narendasan
Copy link
Collaborator

There were some issues with the PR, I filed one against your branch to resolve them. I think that we need to get this merged ASAP, it is currently blocking CUDA 11 work. I think if you rebase to remove those extra commits we should be good to merge this and then do documentation and DLA work in separate PRs.

@andi4191
Copy link
Contributor Author

andi4191 commented Jul 8, 2020

Closing this PR. Updated PR tracked here #124

@andi4191 andi4191 closed this Jul 8, 2020
@andi4191 andi4191 deleted the anuragd/aarch64-jetpack branch June 1, 2021 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Issues re: Build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a toolchain for aarch64
3 participants