MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/compiler/tf2xla/cpu_function_runtime_test.cc:25–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23using ::xla::cpu_function_runtime::BufferInfo;
24
25TEST(XlaCompiledCpuFunctionTest, AlignmentValue) {
26 // We've chosen 64 byte alignment for the tfcompile runtime to mimic the
27 // regular tensorflow allocator, which was chosen to play nicely with Eigen.
28 // The tfcompile runtime also has a requirement that comes from the xla
29 // generated code, on the relation: buffer_size >= 16 ? 2 * sizeof(void*) : 8
30 // So any value that we choose must abide by that constraint as well.
31 EXPECT_EQ(xla::cpu_function_runtime::kAlign, Allocator::kAllocatorAlignment);
32}
33
34std::vector<BufferInfo> SizesToBufferInfos(const intptr_t* sizes, size_t n) {
35 std::vector<BufferInfo> buffer_infos;

Callers

nothing calls this directly

Calls 5

FreeContiguousFunction · 0.85
add_ptrFunction · 0.85
CheckRoundTripIsOkFunction · 0.85

Tested by

no test coverage detected