pytorch/cmake
Nikita Shulga dc9b77cc55 [MPS] Support includes in metal objects (#145087)
Useful for code reuse for Metal shader build both for eager mode and MPSInductor, but it requires one to implement `_cpp_embed_headers` tool that, as name suggests, would preprocess and embeds the for shader to be used in dynamic compilation.
Test using:
 -  `TestMetalLibrary.test_metal_include`
 - Moving `i0`/`i1` implementation to `c10/util/metal_special_math.h` and call it from `SpecialOps.metal` shader, which now looks much more compact:
 ```metal
template <typename T, typename Tout = T>
void kernel
i0(constant T* input,
   device Tout* output,
   uint index [[thread_position_in_grid]]) {
  output[index] = c10::i0(static_cast<Tout>(input[index]));
}
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145087
Approved by: https://github.com/dcci
ghstack dependencies: #145023
2025-01-18 05:35:22 +00:00
..
External Let aotriton.cmake detect the best binary package to use, and deprecate aotriton_version.txt (#137443) 2025-01-09 00:00:02 +00:00
Modules Fix xpu cmake typo (#140374) 2024-11-13 00:26:35 +00:00
Modules_CUDA_fix Add support for blackwell codegen (#141724) 2024-12-03 20:34:43 +00:00
public [ROCm] hipblaslt rowwise f8 gemm (#144432) 2025-01-15 18:23:44 +00:00
Allowlist.cmake
BuildVariables.cmake
Caffe2Config.cmake.in
CheckAbi.cmake
cmake_uninstall.cmake.in
Codegen.cmake [Build] Add COMMIT_SHA to caffe2::GetBuildOptions (#141313) 2024-11-26 00:09:36 +00:00
DebugHelper.cmake
Dependencies.cmake [ROCm] hipblaslt rowwise f8 gemm (#144432) 2025-01-15 18:23:44 +00:00
FlatBuffers.cmake
GoogleTestPatch.cmake
IncludeSource.cpp.in
iOS.cmake
Metal.cmake [MPS] Support includes in metal objects (#145087) 2025-01-18 05:35:22 +00:00
MiscCheck.cmake Add SVE implementation of embedding_lookup_idx (#133995) 2024-10-15 18:52:44 +00:00
prioritized_text.txt
ProtoBuf.cmake
ProtoBufPatch.cmake
Summary.cmake [ROCm] CK Flash Attention Backend (#143695) 2025-01-03 22:01:36 +00:00
TorchConfig.cmake.in [ARM][feat]: Add 4 bit dynamic quantization matmuls & KleidiAI Backend (#134124) 2024-12-20 19:32:03 +00:00
TorchConfigVersion.cmake.in
VulkanCodegen.cmake
VulkanDependencies.cmake