diff --git a/cmake/modules/Utilities.cmake b/cmake/modules/Utilities.cmake index c0679c0e5..862d7c3a2 100644 --- a/cmake/modules/Utilities.cmake +++ b/cmake/modules/Utilities.cmake @@ -74,8 +74,13 @@ endmacro() function(add_to_package) set(flags) - set(singleValueArgs DESTINATION) - set(multiValueArgs FILES TARGETS) + set(singleValueArgs + DESTINATION # The destination directory, RELATIVE to the root of the installation package directory + ) + set(multiValueArgs + FILES # The list of files to place into the DESTINATION directory + TARGETS # THe list of CMake targets whose build artifacts to place into the DESTINATION directory + ) cmake_parse_arguments( args diff --git a/fbgemm_gpu/CMakeLists.txt b/fbgemm_gpu/CMakeLists.txt index 20fe463d8..1ac9be4c2 100644 --- a/fbgemm_gpu/CMakeLists.txt +++ b/fbgemm_gpu/CMakeLists.txt @@ -236,11 +236,11 @@ endif() ################################################################################ if(NOT FBGEMM_CPU_ONLY AND NOT USE_ROCM) - # TODO: Figure out NCCL/RCCL integration with ROCm add_subdirectory(experimental/example) endif() if(NOT FBGEMM_CPU_ONLY) + # Package Triton GEMM (GenAI) kernels add_subdirectory(experimental/gemm) endif() diff --git a/fbgemm_gpu/experimental/example/CMakeLists.txt b/fbgemm_gpu/experimental/example/CMakeLists.txt index cb7563e68..e67784256 100644 --- a/fbgemm_gpu/experimental/example/CMakeLists.txt +++ b/fbgemm_gpu/experimental/example/CMakeLists.txt @@ -9,13 +9,11 @@ ################################################################################ set(experimental_example_cpp_source_files - src/cutlass_sgemm_nn.cu - src/example_ops.cpp - src/nccl_example.cpp) + src/*.cu + src/*.cpp) set(experimental_example_python_source_files - example/__init__.py - example/utils.py) + example/*.py) ################################################################################ diff --git a/fbgemm_gpu/experimental/gemm/CMakeLists.txt b/fbgemm_gpu/experimental/gemm/CMakeLists.txt index a4f7cc6d2..e2fa5a73b 100644 --- a/fbgemm_gpu/experimental/gemm/CMakeLists.txt +++ b/fbgemm_gpu/experimental/gemm/CMakeLists.txt @@ -8,15 +8,15 @@ # Target Sources ################################################################################ -set(experimental_triton_python_source_files - triton_gemm/__init__.py - triton_gemm/fp8_gemm.py - triton_gemm/matmul_perf_model.py) +# Python sources +file(GLOB_RECURSE experimental_triton_gemm_python_source_files + triton_gemm/*.py) ################################################################################ # Install Python Files ################################################################################ -add_to_package(DESTINATION fbgemm_gpu/experimental/gemm/triton_gemm - FILES ${experimental_triton_python_source_files}) +add_to_package( + DESTINATION fbgemm_gpu/experimental/gemm/triton_gemm + FILES ${experimental_triton_gemm_python_source_files}) diff --git a/fbgemm_gpu/experimental/gen_ai/CMakeLists.txt b/fbgemm_gpu/experimental/gen_ai/CMakeLists.txt index d2b702bd0..bf9727716 100644 --- a/fbgemm_gpu/experimental/gen_ai/CMakeLists.txt +++ b/fbgemm_gpu/experimental/gen_ai/CMakeLists.txt @@ -42,8 +42,7 @@ file(GLOB_RECURSE experimental_gen_ai_cpp_source_files_hip # Python sources file(GLOB_RECURSE experimental_gen_ai_python_source_files - RELATIVE gen_ai - *.py) + gen_ai/*.py) ################################################################################