Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into linalg-kron
- Loading branch information
Showing
399 changed files
with
11,419 additions
and
3,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script can also be used to test whether your diff changes any codegen output. | ||
# | ||
# Run it before and after your change: | ||
# .jenkins/pytorch/codegen-test.sh <baseline_output_dir> | ||
# .jenkins/pytorch/codegen-test.sh <test_output_dir> | ||
# | ||
# Then run diff to compare the generated files: | ||
# diff -Naur <baseline_output_dir> <test_output_dir> | ||
|
||
set -eu -o pipefail | ||
|
||
if [ "$#" -eq 0 ]; then | ||
COMPACT_JOB_NAME="${BUILD_ENVIRONMENT}" | ||
source "$(dirname "${BASH_SOURCE[0]}")/common.sh" | ||
OUT="$(dirname "${BASH_SOURCE[0]}")/../../codegen_result" | ||
else | ||
OUT=$1 | ||
fi | ||
|
||
set -x | ||
|
||
rm -rf "$OUT" | ||
|
||
# aten codegen | ||
python -m tools.codegen.gen \ | ||
-d "$OUT"/torch/share/ATen | ||
|
||
# torch codegen | ||
python -m tools.setup_helpers.generate_code \ | ||
--declarations-path "$OUT"/torch/share/ATen/Declarations.yaml \ | ||
--install_dir "$OUT" | ||
|
||
# pyi codegen | ||
mkdir -p "$OUT"/pyi/torch/_C | ||
mkdir -p "$OUT"/pyi/torch/nn | ||
python -m tools.pyi.gen_pyi \ | ||
--declarations-path "$OUT"/torch/share/ATen/Declarations.yaml \ | ||
--out "$OUT"/pyi | ||
|
||
# autograd codegen (called by torch codegen but can run independently) | ||
python -m tools.autograd.gen_autograd \ | ||
"$OUT"/torch/share/ATen/Declarations.yaml \ | ||
"$OUT"/autograd \ | ||
tools/autograd | ||
|
||
# unboxing_wrappers codegen (called by torch codegen but can run independently) | ||
mkdir -p "$OUT"/unboxing_wrappers | ||
python -m tools.jit.gen_unboxing_wrappers \ | ||
"$OUT"/torch/share/ATen/Declarations.yaml \ | ||
"$OUT"/unboxing_wrappers \ | ||
tools/jit/templates | ||
|
||
# annotated_fn_args codegen (called by torch codegen but can run independently) | ||
mkdir -p "$OUT"/annotated_fn_args | ||
python -m tools.autograd.gen_annotated_fn_args \ | ||
"$OUT"/torch/share/ATen/Declarations.yaml \ | ||
"$OUT"/annotated_fn_args \ | ||
tools/autograd |
Oops, something went wrong.