-
Notifications
You must be signed in to change notification settings - Fork 1.1k
cpu: ppc64: enable build without MMA #3959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,12 +40,23 @@ if((DNNL_TARGET_ARCH STREQUAL "X64") OR (DNNL_TARGET_ARCH STREQUAL "AARCH64")) | |
| endif() | ||
|
|
||
| if(DNNL_TARGET_ARCH STREQUAL "PPC64") | ||
| file(GLOB FILES_REQUIRED_OPT | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/gemm/*.[ch]pp | ||
| ) | ||
| if(NOT UPPERCASE_CMAKE_BUILD_TYPE STREQUAL "DEBUG") | ||
| set_source_files_properties(${FILES_REQUIRED_OPT} | ||
| PROPERTIES COMPILE_FLAGS "-O3 -funroll-loops") | ||
| include(CheckSourceCompiles) | ||
|
|
||
| check_source_compiles(C [[ | ||
| #if !defined(__MMA__) | ||
| # error "MMA not available" | ||
| #endif | ||
| int main(void) { return 0; } | ||
| ]] DNNL_PPC64_HAS_MMA) | ||
| if(DNNL_PPC64_HAS_MMA) | ||
| add_definitions_with_host_compiler(-DDNNL_PPC64_HAS_MMA=1) | ||
| file(GLOB FILES_REQUIRED_OPT | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/gemm/*.[ch]pp | ||
| ) | ||
| if(NOT UPPERCASE_CMAKE_BUILD_TYPE STREQUAL "DEBUG") | ||
| set_source_files_properties(${FILES_REQUIRED_OPT} | ||
| PROPERTIES COMPILE_FLAGS "-O3 -funroll-loops") | ||
| endif() | ||
| endif() | ||
| endif() | ||
|
|
||
|
|
@@ -139,7 +150,9 @@ if (DNNL_TARGET_ARCH STREQUAL "AARCH64") | |
| add_subdirectory(aarch64) | ||
| endif() | ||
| if (DNNL_TARGET_ARCH STREQUAL "PPC64") | ||
| add_subdirectory(ppc64) | ||
| if(DNNL_PPC64_HAS_MMA) | ||
| add_subdirectory(ppc64) | ||
| endif() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems excluding the full directory here is not quite correct. |
||
| endif() | ||
| if (DNNL_TARGET_ARCH STREQUAL "S390X") | ||
| add_subdirectory(s390x) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,9 @@ const impl_list_map_t ®ular_f32_u8_impl_list_map() { | |
| DNNL_AARCH64_ONLY(CPU_REORDER_INSTANCE(aarch64::jit_blk_reorder_t)) | ||
| DNNL_AARCH64_ONLY(CPU_REORDER_INSTANCE(aarch64::jit_uni_reorder_t)) | ||
|
|
||
| #ifdef DNNL_PPC64_HAS_MMA | ||
| DNNL_PPC64_ONLY(CPU_REORDER_INSTANCE(ppc64::ppc64_matrixA_reorder_t)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if Edit: it seems a new version of the macro would be needed anyway that would be coupled with build time changes related to |
||
| #endif | ||
|
|
||
| REG_FAST_DIRECT_COPY(f32, u8) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these flags are now applied only for MMA systems?