Created
November 21, 2021 15:17
-
-
Save Bleyddyn/93e258a555dfa98f4fa7dae8b2163fb5 to your computer and use it in GitHub Desktop.
Building pytorch 1.11 on a Raspberry Pi 3B
This file contains hidden or 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
| # Steps needed to build and install pytorch (version 1.11.0a0+gitbe281fc) | |
| # on a Raspberry Pi 3 Model B Rev 1.2, running Raspbian 10 (Buster) | |
| # Linux malpi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux | |
| export NO_CUDA=1 | |
| export NO_DISTRIBUTED=1 | |
| export NO_MKLDNN=1 | |
| export NO_NNPACK=1 | |
| export NO_QNNPACK=1 | |
| export NO_XNNPACK=1 | |
| export USE_CUDNN=0 | |
| export USE_DISTRIBUTED=0 | |
| export USE_MKLDNN=0 | |
| export USE_NNPACK=0 | |
| export USE_QNNPACK=0 | |
| export USE_XNNPACK=0 | |
| export BUILD_TEST=0 | |
| diff --git a/torch/csrc/autograd/python_function.cpp b/torch/csrc/autograd/python_function.cpp | |
| index 01b0eae6ab..d99fb949d5 100644 | |
| --- a/torch/csrc/autograd/python_function.cpp | |
| +++ b/torch/csrc/autograd/python_function.cpp | |
| @@ -437,7 +437,7 @@ static void _save_variables(const std::shared_ptr<PyNode>& cdata_ptr, THPFunctio | |
| } else { | |
| throw torch::TypeError( | |
| "save_for_backward can only save variables, but argument %ld is of " | |
| - "type %s", i, Py_TYPE(obj)->tp_name); | |
| + "type %s", (long int)i, Py_TYPE(obj)->tp_name); | |
| } | |
| } | |
| // Free .to_save | |
| diff --git a/torch/csrc/utils/python_arg_parser.h b/torch/csrc/utils/python_arg_parser.h | |
| index 7e0c9b3402..8a43331698 100644 | |
| --- a/torch/csrc/utils/python_arg_parser.h | |
| +++ b/torch/csrc/utils/python_arg_parser.h | |
| @@ -415,7 +415,7 @@ inline std::vector<int64_t> PythonArgs::intlistWithDefault(int i, std::vector<in | |
| } catch (const std::exception &e) { | |
| throw TypeError("%s(): argument '%s' must be %s, but found element of type %s at pos %ld", | |
| signature.name.c_str(), signature.params[i].name.c_str(), | |
| - signature.params[i].type_name().c_str(), Py_TYPE(obj)->tp_name, idx + 1); | |
| + signature.params[i].type_name().c_str(), Py_TYPE(obj)->tp_name, (long int)idx + 1); | |
| } | |
| } | |
| return res; | |
| @@ -442,7 +442,7 @@ inline std::vector<double> PythonArgs::getDoublelist(int i) { | |
| } catch (const std::exception &e) { | |
| throw TypeError("%s(): argument '%s' must be %s, but found element of type %s at pos %ld", | |
| signature.name.c_str(), signature.params[i].name.c_str(), | |
| - signature.params[i].type_name().c_str(), Py_TYPE(obj)->tp_name, idx + 1); | |
| + signature.params[i].type_name().c_str(), Py_TYPE(obj)->tp_name, (long int)idx + 1); | |
| } | |
| } | |
| return res; | |
| python3 setup.py build | |
| python3 setup.py install --user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment