Add run_pipeline option of rechunk.
This commit is contained in:
parent
e86c69df8b
commit
080d2ecc56
2 changed files with 6 additions and 1 deletions
|
@ -897,6 +897,10 @@ if (GGML_TMAC)
|
||||||
set(GGML_EXTRA_LIBS_PRIVATE ${GGML_EXTRA_LIBS_PRIVATE} t_mac_no_tvm)
|
set(GGML_EXTRA_LIBS_PRIVATE ${GGML_EXTRA_LIBS_PRIVATE} t_mac_no_tvm)
|
||||||
set(GGML_SOURCES_TMAC ${GGML_SOURCES_TMAC} ${TMAC_KERNELS_SOURCE})
|
set(GGML_SOURCES_TMAC ${GGML_SOURCES_TMAC} ${TMAC_KERNELS_SOURCE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (GGML_TMAC_RECHUNK)
|
||||||
|
add_compile_definitions(TMAC_RECHUNK)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(WARNING "TMAC not found")
|
message(WARNING "TMAC not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -7577,13 +7577,14 @@ UseGgmlGemm1:;
|
||||||
|
|
||||||
int64_t dr0 = chunk_size0;
|
int64_t dr0 = chunk_size0;
|
||||||
int64_t dr1 = chunk_size1;
|
int64_t dr1 = chunk_size1;
|
||||||
|
#if defined(TMAC_RECHUNK)
|
||||||
// Rechunk
|
// Rechunk
|
||||||
if ((nchunk1 == 1) && (nchunk0 > nth * 4)) {
|
if ((nchunk1 == 1) && (nchunk0 > nth * 4)) {
|
||||||
// dr0 should be divisible by chunk_size0
|
// dr0 should be divisible by chunk_size0
|
||||||
dr0 = (ne0 / (nth * 4) / chunk_size0) * chunk_size0;
|
dr0 = (ne0 / (nth * 4) / chunk_size0) * chunk_size0;
|
||||||
nchunk0 = (nr0 + dr0 - 1) / dr0;
|
nchunk0 = (nr0 + dr0 - 1) / dr0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int current_chunk = ith;
|
int current_chunk = ith;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue