From 486ac6e89053728b03bead7b953048f6f292797e Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Mon, 6 Apr 2020 16:42:23 -0500 Subject: [PATCH] complete deprecations in loopy.statistitcs --- loopy/__init__.py | 16 +++++----- loopy/statistics.py | 71 --------------------------------------------- 2 files changed, 7 insertions(+), 80 deletions(-) diff --git a/loopy/__init__.py b/loopy/__init__.py index 67ad7de87..807ce8834 100644 --- a/loopy/__init__.py +++ b/loopy/__init__.py @@ -125,11 +125,10 @@ from loopy.type_inference import infer_unknown_types from loopy.preprocess import preprocess_kernel, realize_reduction from loopy.schedule import ( generate_loop_schedules, get_one_scheduled_kernel, get_one_linearized_kernel) -from loopy.statistics import (ToCountMap, CountGranularity, stringify_stats_mapping, - Op, MemAccess, get_op_poly, get_op_map, get_lmem_access_poly, - get_DRAM_access_poly, get_gmem_access_poly, get_mem_access_map, - get_synchronization_poly, get_synchronization_map, - gather_access_footprints, gather_access_footprint_bytes) +from loopy.statistics import (ToCountMap, CountGranularity, + stringify_stats_mapping, Op, MemAccess, get_op_map, get_mem_access_map, + get_synchronization_map, gather_access_footprints, + gather_access_footprint_bytes) from loopy.codegen import ( PreambleInfo, generate_code, generate_code_v2, generate_body) @@ -256,10 +255,9 @@ __all__ = [ "generate_code", "generate_code_v2", "generate_body", "ToCountMap", "CountGranularity", "stringify_stats_mapping", "Op", - "MemAccess", "get_op_poly", "get_op_map", "get_lmem_access_poly", - "get_DRAM_access_poly", "get_gmem_access_poly", "get_mem_access_map", - "get_synchronization_poly", "get_synchronization_map", - "gather_access_footprints", "gather_access_footprint_bytes", + "MemAccess", "get_op_map", "get_mem_access_map", + "get_synchronization_map", "gather_access_footprints", + "gather_access_footprint_bytes", "CompiledKernel", diff --git a/loopy/statistics.py b/loopy/statistics.py index 10d29daad..32fe7741e 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -1863,75 +1863,4 @@ def gather_access_footprint_bytes(kernel, ignore_uncountable=False): # }}} - -# {{{ compat goop - -def get_lmem_access_poly(knl): - """Count the number of local memory accesses in a loopy kernel. - - get_lmem_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['local'] option. - - """ - warn_with_kernel(knl, "deprecated_get_lmem_access_poly", - "get_lmem_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['local'] option.") - return get_mem_access_map(knl).filter_by(mtype=['local']) - - -def get_DRAM_access_poly(knl): - """Count the number of global memory accesses in a loopy kernel. - - get_DRAM_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['global'] option. - - """ - warn_with_kernel(knl, "deprecated_get_DRAM_access_poly", - "get_DRAM_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['global'] option.") - return get_mem_access_map(knl).filter_by(mtype=['global']) - - -def get_gmem_access_poly(knl): - """Count the number of global memory accesses in a loopy kernel. - - get_DRAM_access_poly is deprecated. Use get_mem_access_map and filter the - result with the mtype=['global'] option. - - """ - warn_with_kernel(knl, "deprecated_get_gmem_access_poly", - "get_DRAM_access_poly is deprecated. Use " - "get_mem_access_map and filter the result with the " - "mtype=['global'] option.") - return get_mem_access_map(knl).filter_by(mtype=['global']) - - -def get_synchronization_poly(knl): - """Count the number of synchronization events each work-item encounters in - a loopy kernel. - - get_synchronization_poly is deprecated. Use get_synchronization_map - instead. - - """ - warn_with_kernel(knl, "deprecated_get_synchronization_poly", - "get_synchronization_poly is deprecated. Use " - "get_synchronization_map instead.") - return get_synchronization_map(knl) - - -def get_op_poly(knl, numpy_types=True): - """Count the number of operations in a loopy kernel. - - get_op_poly is deprecated. Use get_op_map instead. - - """ - warn_with_kernel(knl, "deprecated_get_op_poly", - "get_op_poly is deprecated. Use get_op_map instead.") - return get_op_map(knl, numpy_types) - -# }}} - # vim: foldmethod=marker -- GitLab