Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hipify various dependencies to enable AMD Face Enhancer
Summary: This diff extends several targets to be hip compatible and fixes a few silly hipification issues with those targets. After these changes, all dependencies needed for the face enhancer can compile with AMD. A few silly issues that I had to hack around, maybe we could improve hipification to avoid similar issues in the future: * Some of the dependencies used sources in `src/cuda/**.cu`. Hipification tried to rename "cuda" to "hip" and broke the paths. I'm not sure where that rename happens so I just changed the directory from "cuda" to "gpu" to avoid the issue. * One header import called `THCAtomics.cuh` was incorrectly being renamed to `THHAtomics.cuh`, which doesnt exist. Fortunately an equivalent import that doesnt have name issues was available. We also might want to consider graduating the cpp_library_hip bazel helper out of fbgemm since it seems pretty generally useful. For some of the targets, we needed to build a python cpp extension, which as far as I can tell we didnt have good hipification for yet. I added a new buck rule very similar to our standard cpp_library_hip rule that creates an extension instead. It's a little copy-pasted so if there are cleaner ways to work around this requirement let me know. Reviewed By: jianyuh Differential Revision: D61080247
- Loading branch information