Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion runtime/onert/api/python/include/nnfw_api_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef __ONERT_API_PYTHON_NNFW_API_WRAPPER_H__
#define __ONERT_API_PYTHON_NNFW_API_WRAPPER_H__

#include <string>

#include "nnfw.h"
#include "nnfw_experimental.h"
#include "nnfw_internal.h"
Expand Down Expand Up @@ -48,7 +50,7 @@ namespace py = pybind11;
struct tensorinfo
{
/** The data type */
const char *dtype;
std::string dtype;
/** The number of dimensions (rank) */
int32_t rank;
/**
Expand Down
2 changes: 1 addition & 1 deletion runtime/onert/api/python/src/wrapper/nnfw_api_wrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void NNFW_SESSION::close_session()
void NNFW_SESSION::set_input_tensorinfo(uint32_t index, const tensorinfo *tensor_info)
{
nnfw_tensorinfo ti;
ti.dtype = getType(tensor_info->dtype);
ti.dtype = getType(tensor_info->dtype.c_str());
ti.rank = tensor_info->rank;
for (int i = 0; i < NNFW_MAX_RANK; i++)
{
Expand Down