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

Function TEST_F

tensorflow/core/framework/tensor_test.cc:410–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408};
409
410TEST_F(TensorReshapeTest, Reshape) {
411 LOG(INFO) << "shaped";
412
413#define TEST_RESHAPE(...) \
414 { \
415 constexpr int N = (sizeof((int[]){__VA_ARGS__}) / sizeof(int)); \
416 TestReshape<TTypes<float, N>::Tensor, &Tensor::shaped<float, N>>( \
417 {__VA_ARGS__}); \
418 TestReshape<TTypes<float, N>::ConstTensor, &Tensor::shaped<float, N>>( \
419 {__VA_ARGS__}); \
420 TestReshape<TTypes<float, N>::UnalignedTensor, \
421 &Tensor::unaligned_shaped<float, N>>({__VA_ARGS__}); \
422 TestReshape<TTypes<float, N>::UnalignedConstTensor, \
423 &Tensor::unaligned_shaped<float, N>>({__VA_ARGS__}); \
424 TestReshape<TTypes<float, N>::Tensor, \
425 &Tensor::bit_casted_shaped<float, N>>({__VA_ARGS__}); \
426 TestReshape<TTypes<float, N>::ConstTensor, \
427 &Tensor::bit_casted_shaped<float, N>>({__VA_ARGS__}); \
428 TestReshape<TTypes<int32, N>::Tensor, \
429 &Tensor::bit_casted_shaped<int32, N>>({__VA_ARGS__}); \
430 TestReshape<TTypes<int32, N>::ConstTensor, \
431 &Tensor::bit_casted_shaped<int32, N>>({__VA_ARGS__}); \
432 }
433
434 TEST_RESHAPE(120);
435 TEST_RESHAPE(6, 20);
436 TEST_RESHAPE(6, 4, 5);
437 TEST_RESHAPE(2, 3, 4, 5);
438#undef TEST_RESHAPE
439}
440
441TEST_F(TensorReshapeTest, BitcastReshapeDifferentSize) {
442#define TEST_BITCAST8_RESHAPE(...) \

Callers

nothing calls this directly

Calls 2

EXPECT_DEATHFunction · 0.85
dimensionMethod · 0.45

Tested by

no test coverage detected