Skip to content

Commit

Permalink
Add Meta header and fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ymwangg committed Jul 7, 2023
1 parent 1d7c819 commit 9f928be
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ setup_fx2ait_env: &setup_fx2ait_env
sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*
python3.8 -m pip install --ignore-installed --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118
python3.8 fx2ait/setup.py install --prefix=/home/circleci/
echo 'export PYTHONPATH=$PWD/fx2ait:$PYTHONPATH' >> $BASH_ENV
pushd fx2ait
python3.8 setup.py install --prefix=/home/circleci/
popd
break || sleep 5;
done
Expand All @@ -79,7 +80,9 @@ fx2ait_tests: &fx2ait_tests
source $BASH_ENV
mkdir -p ~/test-fx2ait-results
TEST_FILES=$(circleci tests glob "fx2ait/fx2ait/test/test_*.py" "fx2ait/fx2ait/test/converters/**/test_*.py")
pushd ~/test-fx2ait-results
python3.8 -m pytest $TEST_FILES -o junit_family=xunit1 --junitxml=~/test-fx2ait-results/junit.xml --verbose --continue-on-collection-errors -rA
popd
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
Expand Down
15 changes: 15 additions & 0 deletions fx2ait/fx2ait/extension.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import logging
import os
import torch
Expand Down

0 comments on commit 9f928be

Please sign in to comment.