From 639e9a8afd1c5e67e07ae4b2e2e3ced1d489949d Mon Sep 17 00:00:00 2001 From: James Stevens <jdsteve2@illinois.edu> Date: Tue, 13 Oct 2015 18:38:30 -0500 Subject: [PATCH] working on reg usage estimator, still in progress --- loopy/statistics.py | 1 + test/test_statistics.py | 1 + 2 files changed, 2 insertions(+) diff --git a/loopy/statistics.py b/loopy/statistics.py index 7b1a5c7da..60a6e8911 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -416,6 +416,7 @@ class RegisterUsageEstimator(CombineMapper): return 0 else: self.vars_found.append(expr) + print("new var found: ", expr) if "_dim_" in str(expr): #TODO how to remove block/thread size/id vars? return 0 else: diff --git a/test/test_statistics.py b/test/test_statistics.py index 7d89a521d..ffef1996e 100644 --- a/test/test_statistics.py +++ b/test/test_statistics.py @@ -526,6 +526,7 @@ def test_reg_counter_basic(): knl = lp.add_and_infer_dtypes(knl, dict(a=np.float32, b=np.float32, g=np.float64, h=np.float64)) regs = get_regs_per_thread(knl) + #1/0 assert regs == 6 -- GitLab