From 348e0120bee8527410a4c86b333bfdb551b09f15 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Tue, 20 Mar 2018 17:32:34 -0500 Subject: [PATCH 1/3] Does not infer if value is not known --- loopy/type_inference.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index 010a0658f..ff423ef66 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -118,6 +118,10 @@ class TypeInferenceMapper(CombineMapper): 0 <= len(dtype_set) <= 1 for dtype_set in dtype_sets) + for dtype_set in dtype_sets: + if dtype_set == []: + return [] + from pytools import is_single_valued dtypes = [dtype -- GitLab From 828f100837136b6c314fb85e8840307f603f2cae Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Tue, 20 Mar 2018 17:34:57 -0500 Subject: [PATCH 2/3] Added comment for clarification --- loopy/type_inference.py | 1 + 1 file changed, 1 insertion(+) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index ff423ef66..cd79fb34e 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -118,6 +118,7 @@ class TypeInferenceMapper(CombineMapper): 0 <= len(dtype_set) <= 1 for dtype_set in dtype_sets) + # don't infer if any input value is not known for dtype_set in dtype_sets: if dtype_set == []: return [] -- GitLab From 2477b5a06a85f89a3ae56c6e5e47af8aab270618 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Tue, 20 Mar 2018 17:38:04 -0500 Subject: [PATCH 3/3] typo in the comment --- loopy/type_inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index cd79fb34e..714c830b4 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -118,7 +118,7 @@ class TypeInferenceMapper(CombineMapper): 0 <= len(dtype_set) <= 1 for dtype_set in dtype_sets) - # don't infer if any input value is not known + # don't infer if dtype of a dependency is not known for dtype_set in dtype_sets: if dtype_set == []: return [] -- GitLab