提交 a1eb21e7 编写于 作者: T tensor-tang

refine names

上级 b523787f
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
set(JIT_KERNEL_DEPS cpu_info cblas gflags enforce place) set(JIT_KERNEL_DEPS cpu_info cblas gflags enforce place)
cc_library(jit_kernel_base SRCS kernels.cc jitcode_base.cc DEPS ${JIT_KERNEL_DEPS}) file(GLOB jit_kernel_cc_srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.cc")
list(REMOVE_ITEM jit_kernel_cc_srcs jit_test.cc)
cc_library(jit_kernel_base SRCS ${jit_kernel_cc_srcs} DEPS ${JIT_KERNEL_DEPS})
add_subdirectory(refer) add_subdirectory(refer)
add_subdirectory(more) add_subdirectory(more)
...@@ -15,5 +17,5 @@ if(WITH_XBYAK) ...@@ -15,5 +17,5 @@ if(WITH_XBYAK)
add_subdirectory(jitcode) add_subdirectory(jitcode)
endif() endif()
cc_library(jit_kernel SRCS kernels.cc DEPS ${JIT_KERNEL_DEPS}) cc_library(jit_kernel SRCS ${jit_kernel_cc_srcs} DEPS ${JIT_KERNEL_DEPS})
cc_test(jit_kernel_test SRCS test.cc DEPS jit_kernel) cc_test(jit_kernel_test SRCS test.cc DEPS jit_kernel)
...@@ -92,7 +92,7 @@ class JitCode : public JitBase, public Xbyak::CodeGenerator { ...@@ -92,7 +92,7 @@ class JitCode : public JitBase, public Xbyak::CodeGenerator {
for (int i = 0; i < num_g_abi_regs; ++i) { for (int i = 0; i < num_g_abi_regs; ++i) {
push(Xbyak::Reg64(g_abi_regs[i])); push(Xbyak::Reg64(g_abi_regs[i]));
} }
if (platform::jit::MayIUse(platform::jit::avx512f)) { if (platform::MayIUse(platform::avx512f)) {
mov(reg_EVEX_max_8b_offt, 2 * EVEX_max_8b_offt); mov(reg_EVEX_max_8b_offt, 2 * EVEX_max_8b_offt);
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. */ * limitations under the License. */
#include "paddle/fluid/operators/jitkernels/kernels.h" #include "paddle/fluid/operators/jitkernels/kernel_pool.h"
#include <memory> // for shared_ptr #include <memory> // for shared_ptr
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
......
...@@ -41,7 +41,7 @@ class VMulKernel ...@@ -41,7 +41,7 @@ class VMulKernel
VMulKernel() { this->func = VMul<T>; } VMulKernel() { this->func = VMul<T>; }
bool UseMe(int d) const override { bool UseMe(int d) const override {
if (std::is_same<T, float>::value) { if (std::is_same<T, float>::value) {
return platform::jit::MayIUse(platform::jit::avx512f) && d > 512; return platform::MayIUse(platform::avx512f) && d > 512;
} else { } else {
return true; return true;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include <tuple> #include <tuple>
#include <type_traits> #include <type_traits>
#include "paddle/fluid/operators/jitkernels/kernel_base.h" #include "paddle/fluid/operators/jitkernels/kernel_base.h"
#include "paddle/fluid/operators/jitkernels/kernels.h" #include "paddle/fluid/operators/jitkernels/kernel_pool.h"
#include "paddle/fluid/platform/place.h" #include "paddle/fluid/platform/place.h"
#include "paddle/fluid/platform/variant.h" // for UNUSED #include "paddle/fluid/platform/variant.h" // for UNUSED
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "gflags/gflags.h" #include "gflags/gflags.h"
#include "glog/logging.h" #include "glog/logging.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "paddle/fluid/operators/jitkernels/kernels.h" #include "paddle/fluid/operators/jitkernels/kernel_pool.h"
// TODO(TJ): remove me // TODO(TJ): remove me
#include "paddle/fluid/operators/jitkernels/registry.h" #include "paddle/fluid/operators/jitkernels/registry.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册