MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / TEST

Function TEST

test/cpp/phi/core/test_kernel_factory.cc:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29// TODO(chenweihang): add more unittests later
30
31TEST(KernelKey, ConstructAndOStream) {
32 phi::KernelKey key(
33 phi::Backend::CPU, phi::DataLayout::NCHW, phi::DataType::FLOAT32);
34 EXPECT_EQ(key.backend(), phi::Backend::CPU);
35 EXPECT_EQ(key.layout(), phi::DataLayout::NCHW);
36 EXPECT_EQ(key.dtype(), phi::DataType::FLOAT32);
37 std::ostringstream oss;
38 oss << key;
39 std::cout << oss.str();
40 oss.flush();
41}
42
43TEST(KernelFactory, SelectedKernelMap) {
44 auto kernel_map = phi::KernelFactory::Instance().SelectKernelMap("scale");

Callers

nothing calls this directly

Calls 13

InstanceFunction · 0.85
SelectKernelMapMethod · 0.80
args_defMethod · 0.80
input_defsMethod · 0.80
output_defsMethod · 0.80
backendMethod · 0.45
layoutMethod · 0.45
dtypeMethod · 0.45
strMethod · 0.45
flushMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by

no test coverage detected