Program Listing for File kernel_interface.h
↰ Return to documentation for file (include/kernel_interface.h
)
#ifndef MINDSPORE_LITE_INCLUDE_KERNEL_INTERFACE_H_
#define MINDSPORE_LITE_INCLUDE_KERNEL_INTERFACE_H_
#include <memory>
#include <vector>
#include "include/api/types.h"
#include "include/api/status.h"
#include "include/lite_utils.h"
#include "schema/model_generated.h"
namespace mindspore {
namespace kernel {
class Kernel;
class KernelInterface {
public:
virtual ~KernelInterface() = default;
virtual Status Infer(std::vector<mindspore::MSTensor> *inputs, std::vector<mindspore::MSTensor> *outputs,
const schema::Primitive *primitive) {
return kSuccess;
}
virtual Status Infer(std::vector<mindspore::MSTensor> *inputs, std::vector<mindspore::MSTensor> *outputs,
const schema::Primitive *primitive, const Kernel *kernel) {
return Infer(inputs, outputs, primitive);
}
};
} // namespace kernel
} // namespace mindspore
#endif // MINDSPORE_LITE_INCLUDE_KERNEL_INTERFACE_H_