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

refine names

上级 b523787f
......@@ -7,7 +7,9 @@
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(more)
......@@ -15,5 +17,5 @@ if(WITH_XBYAK)
add_subdirectory(jitcode)
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)
......@@ -92,7 +92,7 @@ class JitCode : public JitBase, public Xbyak::CodeGenerator {
for (int i = 0; i < num_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);
}
}
......
......@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* 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 <string>
#include <unordered_map>
......
......@@ -41,7 +41,7 @@ class VMulKernel
VMulKernel() { this->func = VMul<T>; }
bool UseMe(int d) const override {
if (std::is_same<T, float>::value) {
return platform::jit::MayIUse(platform::jit::avx512f) && d > 512;
return platform::MayIUse(platform::avx512f) && d > 512;
} else {
return true;
}
......
......@@ -18,7 +18,7 @@
#include <tuple>
#include <type_traits>
#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/variant.h" // for UNUSED
......
......@@ -19,7 +19,7 @@
#include "gflags/gflags.h"
#include "glog/logging.h"
#include "gtest/gtest.h"
#include "paddle/fluid/operators/jitkernels/kernels.h"
#include "paddle/fluid/operators/jitkernels/kernel_pool.h"
// TODO(TJ): remove me
#include "paddle/fluid/operators/jitkernels/registry.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册