Intercept memcpy with __folly_memcpy in OSS build of Adsim - #195
Conversation
Summary: This diff makes several changes to the code to intercept `memcpy` calls with `__folly_memcpy` in OSS build. The changes include: * Adding a new library `folly_memcpy_obj` to the `CMakeLists.txt` files, which compiles the `FollyMemcpy.cpp` file and includes platform-specific memcpy implementations. * Defining the `FOLLY_MEMCPY_IS_MEMCPY` flag and compiling with AVX2 and march=haswell flags for the `folly_memcpy_obj` library. * Removing the `memwrap.cc` file, which is no longer needed. These changes allow the code to use the optimized `__folly_memcpy` function instead of the standard `memcpy` function, which better mimic the code in the production system. Differential Revision: D79877454
|
This pull request was exported from Phabricator. Differential Revision: D79877454 |
Summary: Pull Request resolved: #195 This diff makes several changes to the code to intercept `memcpy` calls with `__folly_memcpy` in OSS build. The changes include: * Adding a new library `folly_memcpy_obj` to the `CMakeLists.txt` files, which compiles the `FollyMemcpy.cpp` file and includes platform-specific memcpy implementations. * Defining the `FOLLY_MEMCPY_IS_MEMCPY` flag and compiling with AVX2 and march=haswell flags for the `folly_memcpy_obj` library. * Removing the `memwrap.cc` file, which is no longer needed. These changes allow the code to use the optimized `__folly_memcpy` function instead of the standard `memcpy` function, which better mimic the code in the production system. Reviewed By: excelle08 Differential Revision: D79877454 fbshipit-source-id: d4e47e5ba643441baa6ad8efaa9d3ffe5737b256
|
Hi @Kaiweitu! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Summary:
This diff makes several changes to the code to intercept
memcpycalls with__folly_memcpyin OSS build.The changes include:
folly_memcpy_objto theCMakeLists.txtfiles, which compiles theFollyMemcpy.cppfile and includes platform-specific memcpy implementations.FOLLY_MEMCPY_IS_MEMCPYflag and compiling with AVX2 and march=haswell flags for thefolly_memcpy_objlibrary.memwrap.ccfile, which is no longer needed.These changes allow the code to use the optimized
__folly_memcpyfunction instead of the standardmemcpyfunction, which better mimic the code in the production system.Differential Revision: D79877454