2023-02-12 08:23:49 +08:00
|
|
|
|
#include "core/graph_handler.h"
|
|
|
|
|
#include "core/runtime.h"
|
|
|
|
|
#include <test.h>
|
|
|
|
|
|
|
|
|
|
namespace infini {
|
|
|
|
|
|
|
|
|
|
TEST(Handler, matmul) {
|
2023-03-27 21:28:49 +08:00
|
|
|
|
auto runtime = NativeCpuRuntimeObj::getInstance();
|
2023-02-12 08:23:49 +08:00
|
|
|
|
auto handler = make_ref<GraphHandlerObj>(runtime);
|
2023-08-02 16:38:16 +08:00
|
|
|
|
auto i = handler->tensor({1, 2, 3}, DataType::UInt32.getIndex());
|
|
|
|
|
auto w = handler->tensor({1, 3, 4}, DataType::UInt32.getIndex());
|
|
|
|
|
auto o = handler->tensor({1, 2, 4}, DataType::UInt32.getIndex());
|
2023-02-12 08:23:49 +08:00
|
|
|
|
handler->matmul(i, w, o, false, false, nullptr, ActType::None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace infini
|