vela: Move special error cases

Due to an issue with potential cyclical imports, especially when running
individual parts of vela standalone for example with pytest, the
specialised error functions are moved out of errors.py to their
respective locations.
The use of getattr over isinstance prevents the need to import the
tensor/operator class causing the cyclical import issue.

Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: If8cee4b1a2562660c6a47e1c7aeb5d7fd4dd1fca
diff --git a/ethosu/vela/mark_tensors.py b/ethosu/vela/mark_tensors.py
index 723bd87..5a47584 100644
--- a/ethosu/vela/mark_tensors.py
+++ b/ethosu/vela/mark_tensors.py
@@ -15,7 +15,6 @@
 # limitations under the License.
 # Description:
 # Mark purpose and select formats for Tensors.
-from .errors import OperatorError
 from .operation import CustomType
 from .operation import Op
 from .rewrite_graph import visit_graph_post_order
@@ -81,7 +80,7 @@
                 scratch_tensor.purpose = TensorPurpose.Scratch
 
         if scratch_tensor is None:
-            OperatorError(op, "Scratch tensor not found.")
+            op.error("Scratch tensor not found.")
 
 
 def mark_tensor_purpose(nng, arch, verbose_tensor_purpose=False):