PyTorch, Edward Yang, and Team PyTorch에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 PyTorch, Edward Yang, and Team PyTorch 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Player FM -팟 캐스트 앱
Player FM 앱으로 오프라인으로 전환하세요!
Player FM 앱으로 오프라인으로 전환하세요!
CMake
Manage episode 294943767 series 2921809
PyTorch, Edward Yang, and Team PyTorch에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 PyTorch, Edward Yang, and Team PyTorch 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Why is PyTorch's build so g-dang complicated. How to avoid having to deal with cmake at all? And if you have to deal with cmake, what are the most important things to know? And if you were going to improve our cmake, how would you go about doing it...
Further reading.
- The official CMake documentation is a great help and well worth reading https://cmake.org/documentation
- If you work in torch/csrc chances are you'll need to edit this file https://github.com/pytorch/pytorch/blob/master/tools/build_variables.bzl
Liner notes.
- multiple build systems: cmake, buck, xplat buck, ovrsource buck, bazel
- tools/build_variables.bzl is read from cmake! append_filelist
- but not used uniformly for all components! (ouch!)
- tools/build_variables.bzl is read from cmake! append_filelist
- mashed together ATen and Caffe2 build systems (e.g., main library libtorch_cpu is defined in caffe2/CMakeLists.txt)
- cmake: not very much syntax, "everything is a function". This means you can look up constructs relatively easily; e.g., even if() is a command
- the general cmake model: "set a bunch of variables, run a bunch of commands". cmake is VERY GREPPABLE
- but not everything is in CMakeLists.txt; check *.cmake too
- the directory structure makes no sense, you really need to grep.
(doing a lot of set PARENT_SCOPE to propagate stuff) - renaming a file? grep for it
- primary hazard of refactoring: need to make sure all the variables
are setup at the new location
- many directories are not recursive glob, beware of adding new directories
- old school cmake: literally everything is stuffed in variables (CMAKE_CXX_FLAGS). new school cmake: attach things to targets, things propagate when you depend on targets (public/private dependencies)
- add_library: the most important thing
- don't randomly change things and pray: have hypotheses and test them
83 에피소드
Manage episode 294943767 series 2921809
PyTorch, Edward Yang, and Team PyTorch에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 PyTorch, Edward Yang, and Team PyTorch 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Why is PyTorch's build so g-dang complicated. How to avoid having to deal with cmake at all? And if you have to deal with cmake, what are the most important things to know? And if you were going to improve our cmake, how would you go about doing it...
Further reading.
- The official CMake documentation is a great help and well worth reading https://cmake.org/documentation
- If you work in torch/csrc chances are you'll need to edit this file https://github.com/pytorch/pytorch/blob/master/tools/build_variables.bzl
Liner notes.
- multiple build systems: cmake, buck, xplat buck, ovrsource buck, bazel
- tools/build_variables.bzl is read from cmake! append_filelist
- but not used uniformly for all components! (ouch!)
- tools/build_variables.bzl is read from cmake! append_filelist
- mashed together ATen and Caffe2 build systems (e.g., main library libtorch_cpu is defined in caffe2/CMakeLists.txt)
- cmake: not very much syntax, "everything is a function". This means you can look up constructs relatively easily; e.g., even if() is a command
- the general cmake model: "set a bunch of variables, run a bunch of commands". cmake is VERY GREPPABLE
- but not everything is in CMakeLists.txt; check *.cmake too
- the directory structure makes no sense, you really need to grep.
(doing a lot of set PARENT_SCOPE to propagate stuff) - renaming a file? grep for it
- primary hazard of refactoring: need to make sure all the variables
are setup at the new location
- many directories are not recursive glob, beware of adding new directories
- old school cmake: literally everything is stuffed in variables (CMAKE_CXX_FLAGS). new school cmake: attach things to targets, things propagate when you depend on targets (public/private dependencies)
- add_library: the most important thing
- don't randomly change things and pray: have hypotheses and test them
83 에피소드
모든 에피소드
×플레이어 FM에 오신것을 환영합니다!
플레이어 FM은 웹에서 고품질 팟캐스트를 검색하여 지금 바로 즐길 수 있도록 합니다. 최고의 팟캐스트 앱이며 Android, iPhone 및 웹에서도 작동합니다. 장치 간 구독 동기화를 위해 가입하세요.