Artwork

محتوای ارائه شده توسط PyTorch, Edward Yang, and Team PyTorch. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط PyTorch, Edward Yang, and Team PyTorch یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Player FM - برنامه پادکست
با برنامه Player FM !

CMake

17:49
 
اشتراک گذاری
 

Manage episode 294943767 series 2921809
محتوای ارائه شده توسط PyTorch, Edward Yang, and Team PyTorch. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط PyTorch, Edward Yang, and Team PyTorch یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.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.

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!)
  • 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
  continue reading

83 قسمت

Artwork

CMake

PyTorch Developer Podcast

26 subscribers

published

iconاشتراک گذاری
 
Manage episode 294943767 series 2921809
محتوای ارائه شده توسط PyTorch, Edward Yang, and Team PyTorch. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط PyTorch, Edward Yang, and Team PyTorch یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.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.

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!)
  • 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
  continue reading

83 قسمت

همه قسمت ها

×
 
Loading …

به Player FM خوش آمدید!

Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.

 

راهنمای مرجع سریع

در حین کاوش به این نمایش گوش دهید
پخش