Skip to content

Commit

Permalink
[fbgemm_gpu] Fix CMakeLists.txt for experimental/gemm
Browse files Browse the repository at this point in the history
- Fix CMakeLists.txt for experimental/gemm
  • Loading branch information
q10 committed Jan 21, 2025
1 parent 2d025dc commit 477c2a9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
9 changes: 7 additions & 2 deletions cmake/modules/Utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fbgemm_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 3 additions & 5 deletions fbgemm_gpu/experimental/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


################################################################################
Expand Down
12 changes: 6 additions & 6 deletions fbgemm_gpu/experimental/gemm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
3 changes: 1 addition & 2 deletions fbgemm_gpu/experimental/gen_ai/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)


################################################################################
Expand Down

0 comments on commit 477c2a9

Please sign in to comment.