diff options
-rw-r--r-- | boltzgen/kernel/generator.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/boltzgen/kernel/generator.py b/boltzgen/kernel/generator.py index ee5bf8b..6a02e2d 100644 --- a/boltzgen/kernel/generator.py +++ b/boltzgen/kernel/generator.py @@ -15,6 +15,11 @@ class Generator: self.descriptor = self.model.descriptor self.target = target self.float_type = eval("memory.precision.%s" % target).get_float_type(precision) + self.streaming = streaming + + pattern_path = Path(__file__).parent/("template/pattern/%s.%s.mako" % (self.streaming, self.target)) + if not pattern_path.exists(): + raise Exception("Target '%s' doesn't provide streaming pattern '%s'" % (self.target, self.streaming)) try: self.index_impl = eval("memory.index.%s" % index) @@ -26,8 +31,6 @@ class Generator: except AttributeError: raise Exception("There is no layout '%s'" % layout) from None - self.streaming = streaming - def instantiate(self, template, geometry, extras = []): template_path = Path(__file__).parent/("template/%s.%s.mako" % (template, self.target)) if not template_path.exists(): |