Files
pytorch/test/cpp/api/nested.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
394 B
C++
Raw Permalink Normal View History

#include <gtest/gtest.h>
#include <torch/nested.h>
#include <torch/torch.h>
#include <test/cpp/api/support.h>
// Simple test that verifies the nested namespace is registered properly
// properly in C++
TEST(NestedTest, Nested) {
auto a = torch::randn({2, 3});
auto b = torch::randn({4, 5});
auto nt = torch::nested::nested_tensor({a, b});
torch::nested::to_padded_tensor(nt, 0);
}