File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ # All rights reserved.
4
+ #
5
+ # This source code is licensed under the BSD-style license found in the
6
+ # LICENSE file in the root directory of this source tree.
7
+
8
+
9
+ # USE_CPP=1 indicates that the torchao experimental aten kernels will be built and loaded
10
+ # if on Mac with Apple Silicon
11
+
12
+ if [ -z " ${PYTHON_EXECUTABLE:- } " ];
13
+ then
14
+ if [[ -z ${CONDA_DEFAULT_ENV:- } ]] || [[ ${CONDA_DEFAULT_ENV:- } == " base" ]] || [[ ! -x " $( command -v python) " ]];
15
+ then
16
+ PYTHON_EXECUTABLE=python3
17
+ else
18
+ PYTHON_EXECUTABLE=python
19
+ fi
20
+ fi
21
+ echo " Using python executable: $PYTHON_EXECUTABLE "
22
+
23
+ if [[ " $PYTHON_EXECUTABLE " == " python" ]];
24
+ then
25
+ PIP_EXECUTABLE=pip
26
+ elif [[ " $PYTHON_EXECUTABLE " == " python3" ]];
27
+ then
28
+ PIP_EXECUTABLE=pip3
29
+ else
30
+ PIP_EXECUTABLE=pip${PYTHON_SYS_VERSION}
31
+ fi
32
+ echo " Using pip executable: $PIP_EXECUTABLE "
33
+
34
+
35
+ export TORCHAO_PIN=$( cat install/.pins/torchao-pin.txt)
36
+ (
37
+ set -x
38
+ USE_CPP=1 $PIP_EXECUTABLE install git+https://github.com/pytorch/ao.git@${TORCHAO_PIN}
39
+ )
You can’t perform that action at this time.
0 commit comments