diff options
author | Zachary DeVito <zdevito@devfair001.maas> | 2017-06-02 19:02:02 +0000 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2017-11-02 19:53:36 -0400 |
commit | c64b031fbf74c7696a1b055b47034f6adefc873b (patch) | |
tree | 111c166bb18c38f010857162fd65ac89cf122837 /aten/tools | |
parent | 3003ebe67ae03922312e796990eac6a00a9d1633 (diff) | |
download | pytorch-c64b031fbf74c7696a1b055b47034f6adefc873b.tar.gz pytorch-c64b031fbf74c7696a1b055b47034f6adefc873b.tar.bz2 pytorch-c64b031fbf74c7696a1b055b47034f6adefc873b.zip |
Initial commit of framework for TensorLib
Diffstat (limited to 'aten/tools')
-rwxr-xr-x | aten/tools/subtree_dir_add.sh | 17 | ||||
-rwxr-xr-x | aten/tools/subtree_dir_merge.sh | 17 |
2 files changed, 34 insertions, 0 deletions
diff --git a/aten/tools/subtree_dir_add.sh b/aten/tools/subtree_dir_add.sh new file mode 100755 index 0000000000..5eeb2959fb --- /dev/null +++ b/aten/tools/subtree_dir_add.sh @@ -0,0 +1,17 @@ +SRC_BRANCH=$1 +SRC_PATH=$2 +DST_PATH=$3 + +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +set -x +git branch -q -D temporary-split-branch +git checkout $SRC_BRANCH +git subtree split -P $SRC_PATH -b temporary-split-branch +git checkout $CURRENT_BRANCH +git subtree add -P $DST_PATH temporary-split-branch ${@:5} +git branch -D temporary-split-branch + +#./subtree_dir.sh add pytorch/master torch/lib/TH lib/TH +#./subtree_dir.sh add pytorch/master torch/lib/THC lib/THC +#./subtree_dir.sh add pytorch/master torch/lib/THNN lib/THNN +#./subtree_dir.sh add pytorch/master torch/lib/THCUNN lib/THCUNN diff --git a/aten/tools/subtree_dir_merge.sh b/aten/tools/subtree_dir_merge.sh new file mode 100755 index 0000000000..0842c71254 --- /dev/null +++ b/aten/tools/subtree_dir_merge.sh @@ -0,0 +1,17 @@ +SRC_BRANCH=$1 +SRC_PATH=$2 +DST_PATH=$3 + +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +set -x +git branch -q -D temporary-split-branch +git checkout $SRC_BRANCH +git subtree split -P $SRC_PATH -b temporary-split-branch +git checkout $CURRENT_BRANCH +git subtree merge -P $DST_PATH temporary-split-branch -m "Merge commit '`git rev-parse temporary-split-branch`'" +git branch -D temporary-split-branch + +#./subtree_dir.sh merge pytorch/master torch/lib/TH lib/TH +#./subtree_dir.sh merge pytorch/master torch/lib/THC lib/THC +#./subtree_dir.sh merge pytorch/master torch/lib/THNN lib/THNN +#./subtree_dir.sh merge pytorch/master torch/lib/THCUNN lib/THCUNN |