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
ox696c
ktransformers
Commits
063c5489
Commit
063c5489
authored
Apr 28, 2025
by
qiyuxinlin
Browse files
fix can not compile amx
parent
27990dc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
csrc/ktransformers_ext/CMakeLists.txt
csrc/ktransformers_ext/CMakeLists.txt
+3
-3
pyproject.toml
pyproject.toml
+2
-1
No files found.
csrc/ktransformers_ext/CMakeLists.txt
View file @
063c5489
...
@@ -132,7 +132,7 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
...
@@ -132,7 +132,7 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
message
(
STATUS
"x86 detected"
)
message
(
STATUS
"x86 detected"
)
set
(
HOST_IS_X86 TRUE
)
set
(
HOST_IS_X86 TRUE
)
set
(
HAS_AVX512 TRUE
)
set
(
HAS_AVX512 TRUE
)
set
(
HAS_AMX TRUE
)
set
(
__
HAS_AMX
__
TRUE
)
add_compile_definitions
(
__x86_64__
)
add_compile_definitions
(
__x86_64__
)
# check AVX512
# check AVX512
execute_process
(
execute_process
(
...
@@ -157,7 +157,7 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
...
@@ -157,7 +157,7 @@ elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64" OR CMAKE_GENERATOR_PLATFORM_LW
if
(
COMPILER_SUPPORTS_AMX GREATER -1
)
if
(
COMPILER_SUPPORTS_AMX GREATER -1
)
message
(
STATUS
"Compiler supports AMX"
)
message
(
STATUS
"Compiler supports AMX"
)
add_compile_definitions
(
HAS_AMX
)
add_compile_definitions
(
__
HAS_AMX
__
)
else
()
else
()
message
(
STATUS
"Compiler does NOT support AMX"
)
message
(
STATUS
"Compiler does NOT support AMX"
)
endif
()
endif
()
...
@@ -340,7 +340,7 @@ aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/operators/llamafile SOURCE_DIR3
...
@@ -340,7 +340,7 @@ aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/operators/llamafile SOURCE_DIR3
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../third_party/llamafile SOURCE_DIR4
)
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../third_party/llamafile SOURCE_DIR4
)
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/operators/kvcache SOURCE_DIR5
)
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/operators/kvcache SOURCE_DIR5
)
if
(
HOST_IS_X86 AND HAS_AVX512 AND HAS_AMX
)
if
(
HOST_IS_X86 AND HAS_AVX512 AND
__
HAS_AMX
__
)
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/operators/amx SOURCE_DIR6
)
aux_source_directory
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/operators/amx SOURCE_DIR6
)
endif
()
endif
()
...
...
pyproject.toml
View file @
063c5489
...
@@ -29,7 +29,8 @@ dependencies = [
...
@@ -29,7 +29,8 @@ dependencies = [
"colorlog"
,
"colorlog"
,
"build"
,
"build"
,
"fire"
,
"fire"
,
"protobuf"
"protobuf"
,
"triton == 3.2"
]
]
requires-python
=
">=3.10"
requires-python
=
">=3.10"
...
...
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