forked from flagos-ai/FlagGems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
61 lines (56 loc) · 1.6 KB
/
Copy pathCMakeLists.txt
File metadata and controls
61 lines (56 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
add_library(operators
SHARED
device_info.cpp
zeros.cpp
utils.cpp
add.cpp
sum.cpp
max.cpp
mm.cpp
rms_norm.cpp
fused_add_rms_norm.cpp
rotary_embedding.cpp
topk.cpp
addmm.cpp
nonzero.cpp
rotary_embedding.cpp
contiguous.cpp
cat.cpp
bmm.cpp
embedding.cpp
argmax.cpp
div.cpp
softmax.cpp
sort.cpp
exponential_.cpp
fill.cpp
reshape_and_cache_flash.cpp
flash_attn_varlen_func.cpp
rwkv_mm_sparsity.cpp
rwkv_ka_fusion.cpp
copy.cpp)
if (TRITON_GE_3P5)
target_compile_definitions(operators PRIVATE TRITON_GE_3P5)
endif()
target_include_directories(operators
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(operators
PUBLIC Torch::Torch
PRIVATE TritonJIT::triton_jit)
add_library(FlagGems::operators ALIAS operators)
if (FLAGGEMS_INSTALL)
include(GNUInstallDirs)
install(
DIRECTORY "${PROJECT_SOURCE_DIR}/include/flag_gems"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS operators
EXPORT FlagGemsTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(EXPORT FlagGemsTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/FlagGems
NAMESPACE FlagGems::
FILE FlagGemsTargets.cmake)
export(EXPORT FlagGemsTargets FILE "${PROJECT_BINARY_DIR}/FlagGemsTargets.cmake")
endif()