aboutsummaryrefslogtreecommitdiff
path: root/reference_model/src/ops/custom.h
diff options
context:
space:
mode:
authorJerry Ge <jerry.ge@arm.com>2023-10-30 10:18:45 -0700
committerJerry Ge <jerry.ge@arm.com>2023-11-16 21:56:43 +0000
commit5637a8606bc3caeec3c590350de770c7fcec8dd7 (patch)
treeb83a0d33d8a76c77cf560026e6cc8e8db22ad712 /reference_model/src/ops/custom.h
parentd3797f014811ca1ea876989b4839a8297eb1731e (diff)
downloadreference_model-5637a8606bc3caeec3c590350de770c7fcec8dd7.tar.gz
Support loading shared libraries for custom operators
- Add a new command line option to allow users to specify a custom defined dll library - Add a custom registry to store all registered libraries - Add a dummy example (custom_op_example.cpp) for demonstrating this new feature Signed-off-by: Jerry Ge <jerry.ge@arm.com> Change-Id: I7c360835933f77e33fcbd772cabfe01d82282d47
Diffstat (limited to 'reference_model/src/ops/custom.h')
-rw-r--r--reference_model/src/ops/custom.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/reference_model/src/ops/custom.h b/reference_model/src/ops/custom.h
index d14c809..186d2c1 100644
--- a/reference_model/src/ops/custom.h
+++ b/reference_model/src/ops/custom.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2020, ARM Limited.
+// Copyright (c) 2020, 2023 ARM Limited.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -16,23 +16,29 @@
#ifndef OPS_CUSTOM_H
#define OPS_CUSTOM_H
+#include "attribute.h"
+#include "custom_registry.h"
#include "graph_node.h"
using namespace tosa;
namespace TosaReference
{
-
class OpCustom : public GraphNode
{
public:
- OpCustom(SubgraphTraverser* sgt_, uint64_t id_);
- virtual ~OpCustom();
+ OpCustom(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, uint64_t id_);
+ ~OpCustom();
- virtual int checkTensorAttributes();
- virtual int eval();
-};
+ int checkTensorAttributes();
+ int eval();
+protected:
+ TosaCustomAttribute* attribute;
+
+private:
+ CustomOpInterface* custom_op_ptr;
+};
}; // namespace TosaReference
#endif