Skip to content

Commit

Permalink
Update on "Construct CppSignatureGroup from NativeFunction"
Browse files Browse the repository at this point in the history
This will make it easier to implement the POC in
peterbell10@d534f7d
see also #45666

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

Differential Revision: [D25594005](https://our.internmc.facebook.com/intern/diff/D25594005)

[ghstack-poisoned]
  • Loading branch information
ezyang committed Dec 19, 2020
2 parents 69d981a + 7a43b27 commit 52b0fd9
Show file tree
Hide file tree
Showing 396 changed files with 5,159 additions and 1,911 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ jobs:
export CIRCLE_JOB="$CIRCLE_JOB"
export CIRCLE_WORKFLOW_ID="$CIRCLE_WORKFLOW_ID"
cd workspace
python test/print_test_stats.py test
python test/print_test_stats.py --upload-to-s3 test
EOL
echo "(cat docker_commands.sh | docker exec -u jenkins -i "$id" bash) 2>&1" > command.sh
unbuffer bash command.sh | ts
Expand Down
1 change: 1 addition & 0 deletions .circleci/docker/common/install_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
numba \
llvmlite \
unittest-xml-reporting \
boto3==1.16.34 \
coverage \
hypothesis==4.53.2 \
mypy==0.770 \
Expand Down
2 changes: 1 addition & 1 deletion .circleci/verbatim-sources/job-specs/pytorch-job-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
export CIRCLE_JOB="$CIRCLE_JOB"
export CIRCLE_WORKFLOW_ID="$CIRCLE_WORKFLOW_ID"
cd workspace
python test/print_test_stats.py test
python test/print_test_stats.py --upload-to-s3 test
EOL
echo "(cat docker_commands.sh | docker exec -u jenkins -i "$id" bash) 2>&1" > command.sh
unbuffer bash command.sh | ts
Expand Down
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ cppcoreguidelines-*,
hicpp-exception-baseclass,
hicpp-avoid-goto,
modernize-*,
-modernize-concat-nested-namespaces,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-default-member-init,
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ jobs:
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@v1
- name: Checkout PR tip
run: |
set -eux
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# We are on a PR, so actions/checkout leaves us on a merge commit.
# Check out the actual tip of the branch.
git checkout ${{ github.event.pull_request.head.sha }}
fi
echo ::set-output name=commit_sha::$(git rev-parse HEAD)
id: get_pr_tip
- name: Ensure consistent CircleCI YAML config
run: |
pip install -r requirements.txt
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/update_s3_htmls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Update S3 HTML indices for download.pytorch.org
on:
schedule:
# Update the indices every 30 minutes
- cron: "*/30 * * * *"
# Have the ability to trigger this job manually using the API as well
workflow_dispatch:

jobs:
update-html:
runs-on: ubuntu-latest
strategy:
matrix:
prefix: ["whl", "whl/test", "whl/nightly"]
steps:
- name: Run updater image
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_UPDATE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_UPDATE_SECRET_ACCESS_KEY }}
uses: docker://pytorch/manage_s3_html
with:
args: ${{ matrix.prefix }}
15 changes: 15 additions & 0 deletions .jenkins/pytorch/win-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ fi

export SCRIPT_HELPERS_DIR=$SCRIPT_PARENT_DIR/win-test-helpers

set +ex
grep -E -R 'PyLong_(From|As)(Unsigned|)Long\(' --exclude=python_numbers.h torch/
PYLONG_API_CHECK=$?
if [[ $PYLONG_API_CHECK == 0 ]]; then
echo "Usage of PyLong_{From,As}{Unsigned}Long API may lead to overflow errors on Windows"
echo "because \`sizeof(long) == 4\` and \`sizeof(unsigned long) == 4\`."
echo "Please include \"torch/csrc/python_numbers.h\" and use the correspoding APIs instead."
echo "PyLong_FromLong -> THPUtils_packInt32 / THPUtils_packInt64"
echo "PyLong_AsLong -> THPUtils_unpackInt (32-bit) / THPUtils_unpackLong (64-bit)"
echo "PyLong_FromUnsignedLong -> THPUtils_packUInt32 / THPUtils_packUInt64"
echo "PyLong_AsUnsignedLong -> THPUtils_unpackUInt32 / THPUtils_unpackUInt64"
exit 1
fi
set -ex

$SCRIPT_HELPERS_DIR/build_pytorch.bat

assert_git_not_dirty
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ than Linux, which are worth keeping in mind when fixing these problems.
1. Symbols are NOT exported by default on Windows; instead, you have to explicitly
mark a symbol as exported/imported in a header file with `__declspec(dllexport)` /
`__declspec(dllimport)`. We have codified this pattern into a set of macros
which follow the convention `*_API`, e.g., `CAFFE2_API` inside Caffe2 and ATen.
which follow the convention `*_API`, e.g., `TORCH_API` inside Caffe2, Aten and Torch.
(Every separate shared library needs a unique macro name, because symbol visibility
is on a per shared library basis. See c10/macros/Macros.h for more details.)

Expand Down
2 changes: 1 addition & 1 deletion aten/src/ATen/BatchedFallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void batchedTensorForLoopFallback(const c10::OperatorHandle& op, torch::jit::Sta
flat_output.sizes().end());
torch::jit::push(
stack,
input_physical_views.front().newLogicalFromPhysical(flat_output.view(output_sizes)));
input_physical_views.front().getPhysicalToLogicalMap().apply(flat_output.view(output_sizes)));
}
}

Expand Down

0 comments on commit 52b0fd9

Please sign in to comment.