Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ktransformers
Commits
c1f13a69
Commit
c1f13a69
authored
Feb 13, 2025
by
fxzjshm
Browse files
Correctly import compat layer from llama.cpp
Signed-off-by:
fxzjshm
<
fxzjshm@163.com
>
parent
38e5dbc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
ktransformers/ktransformers_ext/CMakeLists.txt
ktransformers/ktransformers_ext/CMakeLists.txt
+15
-3
No files found.
ktransformers/ktransformers_ext/CMakeLists.txt
View file @
c1f13a69
...
@@ -211,6 +211,18 @@ endif()
...
@@ -211,6 +211,18 @@ endif()
list
(
APPEND CMAKE_PREFIX_PATH
${
ROCM_PATH
}
)
list
(
APPEND CMAKE_PREFIX_PATH
${
ROCM_PATH
}
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
ROCM_PATH
}
/lib64/cmake"
)
list
(
APPEND CMAKE_PREFIX_PATH
"
${
ROCM_PATH
}
/lib64/cmake"
)
if
(
NOT EXISTS $ENV{MUSA_PATH}
)
if
(
NOT EXISTS /opt/musa
)
set
(
MUSA_PATH /usr/local/musa
)
else
()
set
(
MUSA_PATH /opt/musa
)
endif
()
else
()
set
(
MUSA_PATH $ENV{MUSA_PATH}
)
endif
()
list
(
APPEND CMAKE_MODULE_PATH
"
${
MUSA_PATH
}
/cmake"
)
add_compile_options
(
"$<$<COMPILE_LANGUAGE:CXX>:
${
ARCH_FLAGS
}
>"
)
add_compile_options
(
"$<$<COMPILE_LANGUAGE:CXX>:
${
ARCH_FLAGS
}
>"
)
add_compile_options
(
"$<$<COMPILE_LANGUAGE:C>:
${
ARCH_FLAGS
}
>"
)
add_compile_options
(
"$<$<COMPILE_LANGUAGE:C>:
${
ARCH_FLAGS
}
>"
)
...
@@ -223,14 +235,14 @@ if (WIN32)
...
@@ -223,14 +235,14 @@ if (WIN32)
elseif
(
UNIX
)
elseif
(
UNIX
)
find_package
(
CUDA
)
find_package
(
CUDA
)
find_package
(
HIP
)
find_package
(
HIP
)
find_package
(
MUSA
)
find_package
(
MUSA
Toolkit
)
if
(
CUDA_FOUND
)
if
(
CUDA_FOUND
)
include_directories
(
"
${
CUDA_INCLUDE_DIRS
}
"
)
include_directories
(
"
${
CUDA_INCLUDE_DIRS
}
"
)
endif
()
endif
()
if
(
HIP_FOUND
)
if
(
HIP_FOUND
)
include_directories
(
"
${
HIP_INCLUDE_DIRS
}
"
)
include_directories
(
"
${
HIP_INCLUDE_DIRS
}
"
)
endif
()
endif
()
if
(
MUSA_FOUND
)
if
(
MUSA
Toolkit
_FOUND
)
include_directories
(
"
${
MUSA_INCLUDE_DIRS
}
"
)
include_directories
(
"
${
MUSA_INCLUDE_DIRS
}
"
)
endif
()
endif
()
endif
()
endif
()
...
@@ -261,7 +273,7 @@ elseif(UNIX)
...
@@ -261,7 +273,7 @@ elseif(UNIX)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE
"
${
ROCM_PATH
}
/lib/libamdhip64.so"
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE
"
${
ROCM_PATH
}
/lib/libamdhip64.so"
)
message
(
STATUS
"Building for HIP"
)
message
(
STATUS
"Building for HIP"
)
endif
()
endif
()
if
(
MUSA_FOUND
)
if
(
MUSA
Toolkit
_FOUND
)
add_compile_definitions
(
USE_MUSA=1
)
add_compile_definitions
(
USE_MUSA=1
)
message
(
STATUS
"Building for MUSA"
)
message
(
STATUS
"Building for MUSA"
)
endif
()
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment