未验证 提交 a2991538 编写于 作者: U umiswing 提交者: GitHub

[cutlass] Avoid rewrite generated kernels in recompilation. (#53575)

上级 b65e9326
......@@ -42,14 +42,18 @@ ExternalProject_Add(
INSTALL_COMMAND ""
TEST_COMMAND "")
set(tmp_gemm_operations_file
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/generated/gemm/all_gemm_operations.h.tmp
)
set(tmp_configurations_file
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/generated/gemm/configurations.h.tmp
)
set(gemm_operations_file
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/generated/gemm/all_gemm_operations.h
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/all_gemm_operations.h
)
set(configurations_file
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/generated/gemm/configurations.h
${CMAKE_SOURCE_DIR}/paddle/phi/kernels/sparse/gpu/cutlass_generator/configurations.h
)
set(tmp_gemm_operations_file ${gemm_operations_file}.tmp)
set(tmp_configurations_file ${configurations_file}.tmp)
add_custom_target(
cutlass_codegen
......
......@@ -75,7 +75,8 @@ namespace sparse {
self.top_level_file = open(self.top_level_path, "w")
self.top_level_file.write(self.header_template)
self.top_level_file.write(
'#include "' + self.operation_path + '/' + 'configurations.h"\n'
'#include "'
+ 'paddle/phi/kernels/sparse/gpu/cutlass_generator/configurations.h"\n'
)
self.configuration_file = open(self.configuration_path, "w")
......
......@@ -18,7 +18,7 @@
#include "paddle/phi/backends/gpu/gpu_context.h"
#include "paddle/phi/common/data_type.h"
#include "paddle/phi/kernels/autotune/auto_tune_base.h"
#include "paddle/phi/kernels/sparse/gpu/cutlass_generator/generated/gemm/all_gemm_operations.h"
#include "paddle/phi/kernels/sparse/gpu/cutlass_generator/all_gemm_operations.h"
namespace phi {
namespace sparse {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册