counted-float 1.1.0__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. {counted_float-1.1.0 → counted_float-1.1.2}/.gitignore +4 -3
  2. {counted_float-1.1.0 → counted_float-1.1.2}/PKG-INFO +66 -57
  3. {counted_float-1.1.0 → counted_float-1.1.2}/README.md +52 -52
  4. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/__init__.py +4 -2
  5. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/_cli.py +4 -4
  6. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/__init__.py +0 -1
  7. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/counted_float/_counted_float_benchmark.py +11 -11
  8. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/flops/_array_generator.py +10 -10
  9. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/flops/_flops_benchmark_suite.py +36 -37
  10. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/flops/_flops_micro_benchmark.py +10 -9
  11. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/micro/_micro_benchmark.py +17 -15
  12. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/compatibility/_numba.py +8 -8
  13. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/_builtin_data.py +34 -31
  14. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/_context_managers.py +30 -18
  15. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/_counted_float.py +53 -52
  16. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/_global_counter.py +33 -33
  17. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/_math_patching.py +51 -59
  18. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/config/_config.py +11 -13
  19. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/config/_defaults.py +4 -6
  20. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_base.py +3 -3
  21. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flop_counts.py +13 -10
  22. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flop_type.py +4 -4
  23. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flop_weights.py +18 -23
  24. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_instruction_latencies.py +12 -14
  25. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_cpu_freq.py +10 -11
  26. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_formatting.py +9 -11
  27. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_geo_mean.py +5 -3
  28. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_latency.py +1 -1
  29. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_missing_data.py +5 -5
  30. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_rounding.py +9 -10
  31. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/_timer.py +13 -9
  32. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/benchmarking/__init__.py +2 -0
  33. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/config/__init__.py +2 -0
  34. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/benchmarks/apple_m1_github_actions.json +1 -1
  35. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/benchmarks/apple_m3_max_mbp16.json +1 -1
  36. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/benchmarks/aws_graviton_2_neoverse_n1_ec2_m6g_xlarge.json +1 -1
  37. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/benchmarks/aws_graviton_3_neoverse_v1_ec2_m7g_xlarge.json +1 -1
  38. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/specs/arm_cortex_a76.json +1 -1
  39. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/specs/arm_cortex_x1.json +1 -1
  40. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/specs/arm_neoverse_n1.json +1 -1
  41. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/specs/arm_neoverse_v1.json +1 -1
  42. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/benchmarks/aws_graviton_4_neoverse_v2_ec2_m8g_xlarge.json +1 -1
  43. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/benchmarks/azure_cobalt_100_neoverse_n2_github_actions.json +1 -1
  44. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/specs/arm_cortex_x2.json +1 -1
  45. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/specs/arm_cortex_x3.json +1 -1
  46. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/specs/arm_neoverse_n2.json +1 -1
  47. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_0/specs/arm_neoverse_v2.json +1 -1
  48. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_2/specs/arm_cortex_x4.json +1 -1
  49. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_2/specs/arm_cortex_x925.json +1 -1
  50. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_2/specs/arm_neoverse_v3.json +1 -1
  51. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2017_zen1/benchmarks/amd_ryzen_1700x.json +1 -1
  52. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2017_zen1/other/analysis_uops_info_zen1+.json +1 -1
  53. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2020_zen3/benchmark/amd_epyc_7763_linux_github.json +1 -1
  54. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2020_zen3/benchmark/amd_epyc_7763_windows_github.json +1 -1
  55. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2020_zen3/other/analysis_agner_fog_r7_5800x.json +1 -1
  56. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2020_zen3/other/analysis_uops_info_zen3.json +1 -1
  57. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2022_zen4/benchmark/amd_epyc_9r14_ec2_m7a_xlarge.json +1 -1
  58. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2022_zen4/other/analysis_agner_fog_r9_7900x.json +1 -1
  59. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2022_zen4/other/analysis_uops_info_zen4.json +1 -1
  60. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2022_zen4/other/specs_amd.json +1 -1
  61. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2024_zen5/benchmark/amd_epyc_9r45_ec2_m8a_xlarge.json +1 -1
  62. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2024_zen5/other/analysis_agner_fog_r7_9800x3d.json +1 -1
  63. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/amd/2024_zen5/other/specs_amd.json +1 -1
  64. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2017_coffee_lake_gen_8/benchmarks/intel_i7_8550U_windows.json +1 -1
  65. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2017_coffee_lake_gen_8/benchmarks/intel_i7_8700B_macos_github_actions.json +1 -1
  66. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2017_coffee_lake_gen_8/other/analysis_agner_fog_coffee_lake.json +1 -1
  67. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2017_coffee_lake_gen_8/other/analysis_uops_info_coffee_lake.json +1 -1
  68. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2019_sunny_cove_gen_10/benchmarks/intel_xeon_8375c_ice_lake_ec2_m6i_xlarge.json +1 -1
  69. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2019_sunny_cove_gen_10/other/analysis_agner_fog_ice_lake.json +1 -1
  70. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2019_sunny_cove_gen_10/other/analysis_uops_info_ice_lake.json +1 -1
  71. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2019_sunny_cove_gen_10/other/analysis_uops_info_tiger_lake.json +1 -1
  72. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2021_golden_cove_gen_12/benchmarks/intel_xeon_8488c_sapphire_rapids_ec2_m7i_xlarge.json +1 -1
  73. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2021_golden_cove_gen_12/other/analysis_uops_info_alder_lake_p.json +1 -1
  74. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2021_golden_cove_gen_12/other/specs_intel.json +1 -1
  75. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2022_raptor_cove_gen_13_14/benchmarks/intel_xeon_8559c_emerald_rapids_ec2_i7i_xlarge.json +1 -1
  76. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2022_raptor_cove_gen_13_14/other/specs_intel.json +1 -1
  77. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2023_redwood_cove_ultra_1/benchmarks/intel_xeon_6975p_granite_rapids_ec2_m8i_xlarge.json +1 -1
  78. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/x86/intel/2023_redwood_cove_ultra_1/other/specs_intel.json +1 -1
  79. counted_float-1.1.2/counted_float/py.typed +0 -0
  80. counted_float-1.1.2/pyproject.toml +154 -0
  81. counted_float-1.1.0/pyproject.toml +0 -69
  82. {counted_float-1.1.0 → counted_float-1.1.2}/LICENSE +0 -0
  83. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/__init__.py +0 -0
  84. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/counted_float/__init__.py +0 -0
  85. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/flops/__init__.py +0 -0
  86. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/benchmarking/micro/__init__.py +0 -0
  87. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/compatibility/__init__.py +0 -0
  88. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/__init__.py +0 -0
  89. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/counting/config/__init__.py +0 -0
  90. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/__init__.py +0 -0
  91. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flops_benchmark_meta_data.py +0 -0
  92. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flops_benchmark_result.py +0 -0
  93. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_flops_benchmark_type.py +0 -0
  94. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/models/_micro_benchmark_result.py +0 -0
  95. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/_core/utils/__init__.py +0 -0
  96. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v8_x/benchmarks/apple_m3_mba15.json +0 -0
  97. {counted_float-1.1.0 → counted_float-1.1.2}/counted_float/data/arm/v9_2/benchmarks/apple_m4_pro_mbp16.json +0 -0
@@ -3,17 +3,18 @@ dist
3
3
  *.tar.gz
4
4
  *.whl
5
5
 
6
- # no need to track uv.lock for a Python package (where deps are not pinned)
7
- uv.lock
8
-
9
6
  # Python cache files
10
7
  __pycache__
11
8
  *.pyc
12
9
 
13
10
  # Coverage reports
14
11
  .coverage
12
+ .coverage.*
15
13
  htmlcov
16
14
 
15
+ # CI metrics artifact (generated by the coverage job, never committed)
16
+ metrics.json
17
+
17
18
  # Jupyter Notebook checkpoints
18
19
  .ipynb_checkpoints
19
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: counted-float
3
- Version: 1.1.0
3
+ Version: 1.1.2
4
4
  Summary: Count floating-point operations in Python code & benchmark relative flop costs.
5
5
  Project-URL: Source, https://github.com/bertpl/counted-float
6
6
  Project-URL: ChangeLog, https://github.com/bertpl/counted-float/blob/main/CHANGELOG.md
@@ -8,21 +8,30 @@ Project-URL: Issues, https://github.com/bertpl/counted-float/issues
8
8
  Project-URL: Roadmap, https://github.com/bertpl/counted-float/milestones
9
9
  License-File: LICENSE
10
10
  Requires-Python: >=3.11
11
- Requires-Dist: numpy>=1.20
12
- Requires-Dist: psutil>=5.0
11
+ Requires-Dist: numpy>=1.23.2; python_version < '3.12'
12
+ Requires-Dist: numpy>=1.26.0; python_version == '3.12'
13
+ Requires-Dist: numpy>=2.1.0; python_version == '3.13'
14
+ Requires-Dist: numpy>=2.3.2; python_version >= '3.14'
15
+ Requires-Dist: psutil>=5.9.4; python_version < '3.13'
16
+ Requires-Dist: psutil>=7.1.2; python_version >= '3.13'
13
17
  Requires-Dist: py-cpuinfo>=9.0.0
14
- Requires-Dist: pydantic>=2.0.0
18
+ Requires-Dist: pydantic>=2.12; python_version >= '3.14'
19
+ Requires-Dist: pydantic>=2.6; python_version < '3.13'
20
+ Requires-Dist: pydantic>=2.9; python_version == '3.13'
15
21
  Requires-Dist: rich>=13.0.0
16
22
  Provides-Extra: cli
17
23
  Requires-Dist: click>=8.0.0; extra == 'cli'
18
24
  Provides-Extra: numba
19
- Requires-Dist: numba>=0.50; extra == 'numba'
25
+ Requires-Dist: numba>=0.57; (python_version < '3.12') and extra == 'numba'
26
+ Requires-Dist: numba>=0.59; (python_version == '3.12') and extra == 'numba'
27
+ Requires-Dist: numba>=0.61; (python_version == '3.13') and extra == 'numba'
28
+ Requires-Dist: numba>=0.63; (python_version >= '3.14') and extra == 'numba'
20
29
  Description-Content-Type: text/markdown
21
30
 
22
31
  ![shields.io-python-versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
23
- ![genbadge-test-count](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/badge-test-count.svg)
24
- ![genbadge-test-coverage](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/badge-coverage.svg)
25
- ![counted_float logo](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/splash.webp)
32
+ ![genbadge-test-count](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/badge-test-count.svg)
33
+ ![genbadge-test-coverage](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/badge-coverage.svg)
34
+ ![counted_float logo](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/splash.webp)
26
35
 
27
36
  # counted-float
28
37
 
@@ -30,8 +39,8 @@ This Python package provides functionality for...
30
39
  - **counting floating point operations** (FLOPs) of numerical algorithms implemented in plain Python, optionally weighted by their relative cost of execution
31
40
  - **running benchmarks** to estimate the relative cost of executing various floating-point operations (requires `numba` optional dependency for achieving accurate results)
32
41
 
33
- The target application area is evaluation of research prototypes of numerical algorithms where (weighted) flop counting can be
34
- useful for estimating total computational cost, in cases where benchmarking a compiled version (C, Rust, ...) is not
42
+ The target application area is evaluation of research prototypes of numerical algorithms where (weighted) flop counting can be
43
+ useful for estimating total computational cost, in cases where benchmarking a compiled version (C, Rust, ...) is not
35
44
  feasible or desirable.
36
45
 
37
46
  Flop weights are computed using a highly curated dataset spanning a wide range of modern CPUs:
@@ -190,7 +199,7 @@ counts.total_count() # 2
190
199
  ## 2.3. Weighted FLOP counting
191
200
 
192
201
  The `counted_float` package contains a set of default, built-in FLOP weights, based on both empirical measurements
193
- and theoretical estimates of the relative cost of different floating point operations.
202
+ and theoretical estimates of the relative cost of different floating point operations.
194
203
 
195
204
  See [fpu_data_sources.md](https://github.com/bertpl/counted-float/tree/develop/docs/analysis_methodology.md) for
196
205
  rationale behind choice of data sources and methodology.
@@ -241,7 +250,7 @@ with FlopCountingContext() as ctx:
241
250
  _ = cf1 + cf2
242
251
  _ = cf1 ** cf2
243
252
  _ = math.log2(cf2)
244
-
253
+
245
254
  flop_counts = ctx.flop_counts()
246
255
  total_cost = flop_counts.total_weighted_cost() # 1 + 40 + 22 = 63
247
256
  ```
@@ -343,7 +352,7 @@ from counted_float.config import get_builtin_flop_weights
343
352
 
344
353
  # 3. Benchmarking
345
354
 
346
- If the package is installed with the optional `numba` dependency, it provides the ability to micro-benchmark
355
+ If the package is installed with the optional `numba` dependency, it provides the ability to micro-benchmark
347
356
  floating point operations as follows:
348
357
 
349
358
  ```
@@ -381,7 +390,7 @@ div : wwwwwwwwwwwwwww.........................
381
390
  div_div : wwwwwwwwwwwwwww......................... [ 5.00 µs ± 0.2% | 20.3K cpu cycles ± 0.2% ] / 1000 iterations
382
391
  lte_addsub : wwwwwwwwwwwwwww......................... [ 1.71 µs ± 0.2% | 6.94K cpu cycles ± 0.2% ] / 1000 iterations
383
392
 
384
- >>> results.flop_weights().show()
393
+ >>> results.flop_weights().show()
385
394
 
386
395
  {
387
396
  FlopType.ABS [abs(x)] : 0.89904
@@ -441,86 +450,86 @@ ALL 0.44
441
450
  │ │ │ ├─apple_m3_mba15 0.90 0.90 1.68 1.00 1.00 1.53 1.24 / / 4.06 5.27 16.68 17.43 17.56 18.09 21.07 17.29 28.63 29.06 38.46 32.32 39.43
442
451
  │ │ │ ├─aws_graviton_2_neoverse_n1_ec2_m6g_xlarge 0.46 1.47 0.38 1.00 1.00 1.38 2.01 / / 5.42 8.76 10.21 14.17 15.98 17.91 22.65 25.25 28.68 29.63 33.95 41.90 40.25
443
452
  │ │ │ └─aws_graviton_3_neoverse_v1_ec2_m7g_xlarge 0.51 1.00 0.01 1.00 1.00 1.50 1.99 / / 6.03 9.58 11.89 14.81 17.49 19.20 19.09 27.67 30.26 31.49 36.85 42.45 40.96
444
- │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.73 2.12 7.50 8.25 / / / / / / / / / / /
445
- │ │ ├─arm_cortex_a76 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
446
- │ │ ├─arm_cortex_x1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
447
- │ │ ├─arm_neoverse_n1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
448
- │ │ └─arm_neoverse_v1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
453
+ │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.73 2.12 7.50 8.25 / / / / / / / / / / /
454
+ │ │ ├─arm_cortex_a76 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
455
+ │ │ ├─arm_cortex_x1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
456
+ │ │ ├─arm_neoverse_n1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
457
+ │ │ └─arm_neoverse_v1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
449
458
  │ ├─v9_0 0.74 1.00 0.25 1.00 1.00 1.51 1.80 1.27 1.27 6.78 8.83 14.32 17.90 20.66 22.09 24.04 32.41 35.53 37.31 44.86 52.70 48.30
450
459
  │ │ ├─benchmarks 0.54 1.00 0.06 1.00 1.00 1.52 2.16 / / 6.14 9.75 12.12 15.15 17.49 18.70 20.35 27.44 30.08 31.59 37.98 44.62 40.89
451
460
  │ │ │ ├─aws_graviton_4_neoverse_v2_ec2_m8g_xlarge 0.52 1.00 0.01 1.00 1.00 1.50 2.05 / / 6.04 9.49 12.66 14.40 17.66 18.54 19.86 27.12 28.76 30.11 36.90 42.70 38.65
452
461
  │ │ │ └─azure_cobalt_100_neoverse_n2_github_actions 0.57 1.00 0.33 1.00 1.00 1.53 2.28 / / 6.23 10.02 11.61 15.94 17.33 18.87 20.85 27.76 31.46 33.15 39.09 46.62 43.26
453
- │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
454
- │ │ ├─arm_cortex_x2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
455
- │ │ ├─arm_cortex_x3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
456
- │ │ ├─arm_neoverse_n2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
457
- │ │ └─arm_neoverse_v2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
462
+ │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
463
+ │ │ ├─arm_cortex_x2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
464
+ │ │ ├─arm_cortex_x3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
465
+ │ │ ├─arm_neoverse_n2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
466
+ │ │ └─arm_neoverse_v2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
458
467
  │ └─v9_2 1.16 1.16 1.55 1.02 1.00 1.51 1.55 1.66 1.66 5.80 6.70 18.44 20.04 19.11 19.75 22.96 19.23 29.29 31.69 40.89 34.73 42.11
459
468
  │ ├─benchmarks 1.35 1.35 2.40 1.03 1.00 1.51 1.84 / / 5.32 7.10 20.38 22.15 21.13 21.83 25.38 21.25 32.38 35.03 45.20 38.39 46.55
460
469
  │ │ └─apple_m4_pro_mbp16 1.35 1.35 2.40 1.03 1.00 1.51 1.84 / / 5.32 7.10 20.38 22.15 21.13 21.83 25.38 21.25 32.38 35.03 45.20 38.39 46.55
461
- │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.31 1.50 1.50 6.33 6.33 / / / / / / / / / / /
462
- │ ├─arm_cortex_x4 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
463
- │ ├─arm_cortex_x925 1.00 1.00 1.00 1.00 1.00 1.50 1.00 1.50 1.50 6.00 6.00 / / / / / / / / / / /
464
- │ └─arm_neoverse_v3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
470
+ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.31 1.50 1.50 6.33 6.33 / / / / / / / / / / /
471
+ │ ├─arm_cortex_x4 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
472
+ │ ├─arm_cortex_x925 1.00 1.00 1.00 1.00 1.00 1.50 1.00 1.50 1.50 6.00 6.00 / / / / / / / / / / /
473
+ │ └─arm_neoverse_v3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
465
474
  └─x86 0.21 0.49 1.50 0.98 1.00 1.30 1.97 2.46 2.31 4.98 7.15 15.62 16.40 18.29 23.83 22.58 24.87 28.39 28.70 41.03 41.15 43.35
466
475
  ├─amd 0.25 0.45 1.52 0.99 1.00 1.17 1.22 2.39 2.51 4.74 7.38 18.22 16.50 17.98 24.59 23.73 24.13 28.04 28.30 42.41 40.31 45.11
467
476
  │ ├─2017_zen1 0.34 0.34 1.16 1.00 1.00 1.29 1.34 3.07 3.07 4.18 6.44 63.95 19.71 17.05 32.24 43.83 18.79 30.58 30.27 57.99 39.24 66.55
468
477
  │ │ ├─benchmarks 0.35 0.35 0.58 1.01 1.00 1.24 1.34 / / 4.03 6.23 58.90 18.16 15.70 29.69 40.37 17.30 28.16 27.88 53.41 36.14 61.29
469
478
  │ │ │ └─amd_ryzen_1700x 0.35 0.35 0.58 1.01 1.00 1.24 1.34 / / 4.03 6.23 58.90 18.16 15.70 29.69 40.37 17.30 28.16 27.88 53.41 36.14 61.29
470
- │ │ └─other 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
471
- │ │ └─analysis_uops_info_zen1+ 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
479
+ │ │ └─other 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
480
+ │ │ └─analysis_uops_info_zen1+ 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
472
481
  │ ├─2020_zen3 0.18 0.34 1.16 1.00 1.00 0.98 1.00 2.17 2.34 4.36 6.76 11.69 15.85 16.99 22.46 19.32 21.13 24.05 24.07 38.13 38.04 39.06
473
482
  │ │ ├─benchmark 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.30 6.86 10.33 14.01 15.02 19.86 17.08 18.69 21.26 21.28 33.72 33.63 34.54
474
483
  │ │ │ ├─amd_epyc_7763_linux_github 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.31 6.86 10.35 11.79 15.35 14.36 14.53 22.21 22.45 22.86 30.57 33.34 31.25
475
484
  │ │ │ └─amd_epyc_7763_windows_github 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.28 6.86 10.32 16.65 14.70 27.48 20.08 15.72 20.14 19.82 37.19 33.92 38.17
476
- │ │ └─other 0.33 0.33 1.97 1.00 1.00 0.95 1.00 2.45 2.65 4.42 6.67 / / / / / / / / / / /
477
- │ │ ├─analysis_agner_fog_r7_5800x 0.33 0.33 1.67 1.00 1.00 / 1.00 2.00 2.33 4.50 6.67 / / / / / / / / / / /
478
- │ │ └─analysis_uops_info_zen3 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 3.00 4.33 6.67 / / / / / / / / / / /
485
+ │ │ └─other 0.33 0.33 1.97 1.00 1.00 0.95 1.00 2.45 2.65 4.42 6.67 / / / / / / / / / / /
486
+ │ │ ├─analysis_agner_fog_r7_5800x 0.33 0.33 1.67 1.00 1.00 / 1.00 2.00 2.33 4.50 6.67 / / / / / / / / / / /
487
+ │ │ └─analysis_uops_info_zen3 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 3.00 4.33 6.67 / / / / / / / / / / /
479
488
  │ ├─2022_zen4 0.15 0.33 1.41 0.99 1.00 0.99 1.00 1.85 1.78 4.41 6.92 10.77 12.47 17.12 20.49 15.83 25.03 24.11 24.56 32.21 35.99 33.32
480
489
  │ │ ├─benchmark 0.07 0.33 1.57 0.97 1.00 0.98 0.99 / / 4.49 6.95 9.97 11.55 15.86 18.98 14.66 23.19 22.34 22.75 29.84 33.34 30.87
481
490
  │ │ │ └─amd_epyc_9r14_ec2_m7a_xlarge 0.07 0.33 1.57 0.97 1.00 0.98 0.99 / / 4.49 6.95 9.97 11.55 15.86 18.98 14.66 23.19 22.34 22.75 29.84 33.34 30.87
482
- │ │ └─other 0.33 0.33 1.28 1.00 1.00 1.01 1.00 2.00 1.92 4.33 6.89 / / / / / / / / / / /
483
- │ │ ├─analysis_agner_fog_r9_7900x 0.33 0.33 1.33 1.00 1.00 / 1.00 2.00 2.00 4.33 7.00 / / / / / / / / / / /
484
- │ │ ├─analysis_uops_info_zen4 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 2.67 4.33 7.00 / / / / / / / / / / /
485
- │ │ └─specs_amd 0.33 0.33 0.67 1.00 1.00 1.00 1.00 1.33 1.33 4.33 6.67 / / / / / / / / / / /
491
+ │ │ └─other 0.33 0.33 1.28 1.00 1.00 1.01 1.00 2.00 1.92 4.33 6.89 / / / / / / / / / / /
492
+ │ │ ├─analysis_agner_fog_r9_7900x 0.33 0.33 1.33 1.00 1.00 / 1.00 2.00 2.00 4.33 7.00 / / / / / / / / / / /
493
+ │ │ ├─analysis_uops_info_zen4 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 2.67 4.33 7.00 / / / / / / / / / / /
494
+ │ │ └─specs_amd 0.33 0.33 0.67 1.00 1.00 1.00 1.00 1.33 1.33 4.33 6.67 / / / / / / / / / / /
486
495
  │ └─2024_zen5 0.39 1.04 2.83 0.95 1.00 1.50 1.68 2.64 3.08 6.31 9.84 13.71 19.04 21.09 24.62 23.64 34.12 34.84 35.83 45.40 49.16 47.78
487
496
  │ ├─benchmark 0.21 1.53 2.95 0.91 1.00 1.36 1.87 / / 6.12 9.69 13.33 18.50 20.50 23.94 22.98 33.17 33.87 34.83 44.14 47.79 46.45
488
497
  │ │ └─amd_epyc_9r45_ec2_m8a_xlarge 0.21 1.53 2.95 0.91 1.00 1.36 1.87 / / 6.12 9.69 13.33 18.50 20.50 23.94 22.98 33.17 33.87 34.83 44.14 47.79 46.45
489
- │ └─other 0.71 0.71 2.72 1.00 1.00 1.66 1.50 2.72 3.17 6.50 10.00 / / / / / / / / / / /
490
- │ ├─analysis_agner_fog_r7_9800x3d 1.00 1.00 3.00 1.00 1.00 / 1.50 3.00 3.50 6.50 10.00 / / / / / / / / / / /
491
- │ └─specs_amd 0.50 0.50 / 1.00 1.00 1.50 1.50 / / 6.50 10.00 / / / / / / / / / / /
498
+ │ └─other 0.71 0.71 2.72 1.00 1.00 1.66 1.50 2.72 3.17 6.50 10.00 / / / / / / / / / / /
499
+ │ ├─analysis_agner_fog_r7_9800x3d 1.00 1.00 3.00 1.00 1.00 / 1.50 3.00 3.50 6.50 10.00 / / / / / / / / / / /
500
+ │ └─specs_amd 0.50 0.50 / 1.00 1.00 1.50 1.50 / / 6.50 10.00 / / / / / / / / / / /
492
501
  └─intel 0.18 0.53 1.47 0.98 1.00 1.45 3.17 2.53 2.14 5.23 6.93 13.38 16.30 18.60 23.09 21.50 25.64 28.75 29.11 39.70 42.01 41.67
493
502
  ├─2017_coffee_lake_gen_8 0.14 0.40 1.12 0.98 1.00 1.03 1.99 1.69 1.69 3.54 4.56 10.27 16.31 12.42 19.10 21.50 12.84 20.48 20.47 32.65 28.21 35.74
494
503
  │ ├─benchmarks 0.08 0.63 1.73 0.96 1.00 1.05 1.99 / / 3.45 4.78 10.69 16.98 12.92 19.88 22.38 13.37 21.31 21.31 33.99 29.36 37.20
495
504
  │ │ ├─intel_i7_8550U_windows 0.08 0.44 1.69 1.01 1.00 1.01 2.00 / / 3.15 4.79 7.02 15.44 11.99 30.07 21.33 13.00 17.80 17.21 32.36 28.09 35.06
496
505
  │ │ └─intel_i7_8700B_macos_github_actions 0.08 0.91 1.77 0.92 1.00 1.10 1.97 / / 3.78 4.77 16.30 18.68 13.93 13.15 23.47 13.74 25.51 26.38 35.70 30.68 39.48
497
- │ └─other 0.25 0.25 0.73 1.00 1.00 1.00 2.00 1.62 1.62 3.62 4.36 / / / / / / / / / / /
498
- │ ├─analysis_agner_fog_coffee_lake 0.25 0.25 / 1.00 1.00 1.00 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
499
- │ └─analysis_uops_info_coffee_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
506
+ │ └─other 0.25 0.25 0.73 1.00 1.00 1.00 2.00 1.62 1.62 3.62 4.36 / / / / / / / / / / /
507
+ │ ├─analysis_agner_fog_coffee_lake 0.25 0.25 / 1.00 1.00 1.00 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
508
+ │ └─analysis_uops_info_coffee_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
500
509
  ├─2019_sunny_cove_gen_10 0.10 0.33 0.92 0.95 1.00 0.98 1.94 1.60 1.60 3.58 4.54 12.27 9.43 14.01 17.18 13.39 20.23 19.23 19.83 28.71 29.72 28.95
501
510
  │ ├─benchmarks 0.04 0.44 1.30 0.91 1.00 1.00 1.89 / / 3.50 4.60 11.82 9.08 13.49 16.55 12.90 19.48 18.52 19.09 27.65 28.63 27.88
502
511
  │ │ └─intel_xeon_8375c_ice_lake_ec2_m6i_xlarge 0.04 0.44 1.30 0.91 1.00 1.00 1.89 / / 3.50 4.60 11.82 9.08 13.49 16.55 12.90 19.48 18.52 19.09 27.65 28.63 27.88
503
- │ └─other 0.25 0.25 0.66 1.00 1.00 0.97 2.00 1.66 1.66 3.66 4.49 / / / / / / / / / / /
504
- │ ├─analysis_agner_fog_ice_lake 0.25 0.25 0.50 1.00 1.00 / 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
505
- │ ├─analysis_uops_info_ice_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
506
- │ └─analysis_uops_info_tiger_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
512
+ │ └─other 0.25 0.25 0.66 1.00 1.00 0.97 2.00 1.66 1.66 3.66 4.49 / / / / / / / / / / /
513
+ │ ├─analysis_agner_fog_ice_lake 0.25 0.25 0.50 1.00 1.00 / 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
514
+ │ ├─analysis_uops_info_ice_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
515
+ │ └─analysis_uops_info_tiger_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
507
516
  ├─2021_golden_cove_gen_12 0.23 0.64 1.76 0.99 1.00 1.80 4.05 3.11 2.63 6.34 8.58 14.98 18.37 21.93 25.63 24.02 32.77 34.73 35.06 44.04 50.72 46.59
508
517
  │ ├─benchmarks 0.13 0.99 2.52 0.98 1.00 1.99 5.03 / / 6.80 9.74 16.28 19.97 23.84 27.86 26.11 35.63 37.76 38.12 47.88 55.14 50.65
509
518
  │ │ └─intel_xeon_8488c_sapphire_rapids_ec2_m7i_xlarge 0.13 0.99 2.52 0.98 1.00 1.99 5.03 / / 6.80 9.74 16.28 19.97 23.84 27.86 26.11 35.63 37.76 38.12 47.88 55.14 50.65
510
- │ └─other 0.41 0.41 1.22 1.00 1.00 1.63 3.27 2.86 2.42 5.92 7.55 / / / / / / / / / / /
511
- │ ├─analysis_uops_info_alder_lake_p 0.33 0.33 1.00 1.00 1.00 1.33 2.67 2.33 2.33 5.00 6.33 / / / / / / / / / / /
512
- │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
519
+ │ └─other 0.41 0.41 1.22 1.00 1.00 1.63 3.27 2.86 2.42 5.92 7.55 / / / / / / / / / / /
520
+ │ ├─analysis_uops_info_alder_lake_p 0.33 0.33 1.00 1.00 1.00 1.33 2.67 2.33 2.33 5.00 6.33 / / / / / / / / / / /
521
+ │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
513
522
  ├─2022_raptor_cove_gen_13_14 0.26 0.71 1.96 1.00 1.00 2.00 4.51 3.55 2.53 7.00 9.49 15.73 19.93 24.00 28.64 26.02 35.73 37.86 38.33 49.02 55.79 51.16
514
523
  │ ├─benchmarks 0.13 1.00 2.55 1.00 1.00 2.00 5.08 / / 7.00 10.00 15.95 20.20 24.33 29.03 26.37 36.21 38.37 38.85 49.69 56.55 51.86
515
524
  │ │ └─intel_xeon_8559c_emerald_rapids_ec2_i7i_xlarge 0.13 1.00 2.55 1.00 1.00 2.00 5.08 / / 7.00 10.00 15.95 20.20 24.33 29.03 26.37 36.21 38.37 38.85 49.69 56.55 51.86
516
- │ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
517
- │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
525
+ │ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
526
+ │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
518
527
  └─2023_redwood_cove_ultra_1 0.24 0.71 1.95 0.99 1.00 1.73 4.51 3.46 2.47 6.97 9.47 14.44 20.41 24.32 27.29 25.53 36.40 37.92 38.32 48.75 55.19 50.95
519
528
  ├─benchmarks 0.12 1.01 2.53 0.98 1.00 1.50 5.09 / / 6.94 9.96 14.28 20.19 24.06 26.99 25.26 36.01 37.51 37.91 48.22 54.60 50.40
520
529
  │ └─intel_xeon_6975p_granite_rapids_ec2_m8i_xlarge 0.12 1.01 2.53 0.98 1.00 1.50 5.09 / / 6.94 9.96 14.28 20.19 24.06 26.99 25.26 36.01 37.51 37.91 48.22 54.60 50.40
521
- └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
522
- └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
523
-
530
+ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
531
+ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
532
+
524
533
 
525
534
  ```
526
535
 
@@ -557,7 +566,7 @@ CountedFloat is 37.3x slower than float
557
566
  - currently any non-Python-built-in math operations are not counted (e.g. `numpy`)
558
567
  - not all Python built-in math operations are counted (e.g. hyperbolic functions)
559
568
  - flop weights should be taken with a grain of salt and should only provide relative ballpark estimates w.r.t computational complexity. Production implementations in a compiled language could have vastly differing performance depending on cpu cache sizes, branch prediction misses, compiler optimizations using vector operations (AVX etc...), etc...
560
-
569
+
561
570
  # Appendix A - Flop counting / analysis details
562
571
 
563
572
  This appendix provides detailed information about how each floating-point operation (FLOP) type is counted and analyzed in the `counted-float` package. All `math.*` entries below assume an active `FlopCountingContext` (outside one, the `math` module is not instrumented). For each flop type, you will find:
@@ -719,4 +728,4 @@ This appendix provides detailed information about how each floating-point operat
719
728
  - **ARM:** (software)
720
729
  - **x86:** (software)
721
730
  - **Counted Python operations:** `math.tan(x)` for `CountedFloat`
722
- - **Not counted:** `tan` on non-CountedFloat, `numpy.tan
731
+ - **Not counted:** `tan` on non-CountedFloat, `numpy.tan
@@ -1,7 +1,7 @@
1
1
  ![shields.io-python-versions](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13-blue)
2
- ![genbadge-test-count](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/badge-test-count.svg)
3
- ![genbadge-test-coverage](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/badge-coverage.svg)
4
- ![counted_float logo](https://bertpl.github.io/counted-float/version_artifacts/develop/v1.1.0/splash.webp)
2
+ ![genbadge-test-count](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/badge-test-count.svg)
3
+ ![genbadge-test-coverage](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/badge-coverage.svg)
4
+ ![counted_float logo](https://bertpl.github.io/counted-float/version_artifacts/release/v1.1.2/splash.webp)
5
5
 
6
6
  # counted-float
7
7
 
@@ -9,8 +9,8 @@ This Python package provides functionality for...
9
9
  - **counting floating point operations** (FLOPs) of numerical algorithms implemented in plain Python, optionally weighted by their relative cost of execution
10
10
  - **running benchmarks** to estimate the relative cost of executing various floating-point operations (requires `numba` optional dependency for achieving accurate results)
11
11
 
12
- The target application area is evaluation of research prototypes of numerical algorithms where (weighted) flop counting can be
13
- useful for estimating total computational cost, in cases where benchmarking a compiled version (C, Rust, ...) is not
12
+ The target application area is evaluation of research prototypes of numerical algorithms where (weighted) flop counting can be
13
+ useful for estimating total computational cost, in cases where benchmarking a compiled version (C, Rust, ...) is not
14
14
  feasible or desirable.
15
15
 
16
16
  Flop weights are computed using a highly curated dataset spanning a wide range of modern CPUs:
@@ -169,7 +169,7 @@ counts.total_count() # 2
169
169
  ## 2.3. Weighted FLOP counting
170
170
 
171
171
  The `counted_float` package contains a set of default, built-in FLOP weights, based on both empirical measurements
172
- and theoretical estimates of the relative cost of different floating point operations.
172
+ and theoretical estimates of the relative cost of different floating point operations.
173
173
 
174
174
  See [fpu_data_sources.md](https://github.com/bertpl/counted-float/tree/develop/docs/analysis_methodology.md) for
175
175
  rationale behind choice of data sources and methodology.
@@ -220,7 +220,7 @@ with FlopCountingContext() as ctx:
220
220
  _ = cf1 + cf2
221
221
  _ = cf1 ** cf2
222
222
  _ = math.log2(cf2)
223
-
223
+
224
224
  flop_counts = ctx.flop_counts()
225
225
  total_cost = flop_counts.total_weighted_cost() # 1 + 40 + 22 = 63
226
226
  ```
@@ -322,7 +322,7 @@ from counted_float.config import get_builtin_flop_weights
322
322
 
323
323
  # 3. Benchmarking
324
324
 
325
- If the package is installed with the optional `numba` dependency, it provides the ability to micro-benchmark
325
+ If the package is installed with the optional `numba` dependency, it provides the ability to micro-benchmark
326
326
  floating point operations as follows:
327
327
 
328
328
  ```
@@ -360,7 +360,7 @@ div : wwwwwwwwwwwwwww.........................
360
360
  div_div : wwwwwwwwwwwwwww......................... [ 5.00 µs ± 0.2% | 20.3K cpu cycles ± 0.2% ] / 1000 iterations
361
361
  lte_addsub : wwwwwwwwwwwwwww......................... [ 1.71 µs ± 0.2% | 6.94K cpu cycles ± 0.2% ] / 1000 iterations
362
362
 
363
- >>> results.flop_weights().show()
363
+ >>> results.flop_weights().show()
364
364
 
365
365
  {
366
366
  FlopType.ABS [abs(x)] : 0.89904
@@ -420,86 +420,86 @@ ALL 0.44
420
420
  │ │ │ ├─apple_m3_mba15 0.90 0.90 1.68 1.00 1.00 1.53 1.24 / / 4.06 5.27 16.68 17.43 17.56 18.09 21.07 17.29 28.63 29.06 38.46 32.32 39.43
421
421
  │ │ │ ├─aws_graviton_2_neoverse_n1_ec2_m6g_xlarge 0.46 1.47 0.38 1.00 1.00 1.38 2.01 / / 5.42 8.76 10.21 14.17 15.98 17.91 22.65 25.25 28.68 29.63 33.95 41.90 40.25
422
422
  │ │ │ └─aws_graviton_3_neoverse_v1_ec2_m7g_xlarge 0.51 1.00 0.01 1.00 1.00 1.50 1.99 / / 6.03 9.58 11.89 14.81 17.49 19.20 19.09 27.67 30.26 31.49 36.85 42.45 40.96
423
- │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.73 2.12 7.50 8.25 / / / / / / / / / / /
424
- │ │ ├─arm_cortex_a76 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
425
- │ │ ├─arm_cortex_x1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
426
- │ │ ├─arm_neoverse_n1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
427
- │ │ └─arm_neoverse_v1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
423
+ │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.73 2.12 7.50 8.25 / / / / / / / / / / /
424
+ │ │ ├─arm_cortex_a76 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
425
+ │ │ ├─arm_cortex_x1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
426
+ │ │ ├─arm_neoverse_n1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 2.00 3.00 7.50 8.50 / / / / / / / / / / /
427
+ │ │ └─arm_neoverse_v1 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
428
428
  │ ├─v9_0 0.74 1.00 0.25 1.00 1.00 1.51 1.80 1.27 1.27 6.78 8.83 14.32 17.90 20.66 22.09 24.04 32.41 35.53 37.31 44.86 52.70 48.30
429
429
  │ │ ├─benchmarks 0.54 1.00 0.06 1.00 1.00 1.52 2.16 / / 6.14 9.75 12.12 15.15 17.49 18.70 20.35 27.44 30.08 31.59 37.98 44.62 40.89
430
430
  │ │ │ ├─aws_graviton_4_neoverse_v2_ec2_m8g_xlarge 0.52 1.00 0.01 1.00 1.00 1.50 2.05 / / 6.04 9.49 12.66 14.40 17.66 18.54 19.86 27.12 28.76 30.11 36.90 42.70 38.65
431
431
  │ │ │ └─azure_cobalt_100_neoverse_n2_github_actions 0.57 1.00 0.33 1.00 1.00 1.53 2.28 / / 6.23 10.02 11.61 15.94 17.33 18.87 20.85 27.76 31.46 33.15 39.09 46.62 43.26
432
- │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
433
- │ │ ├─arm_cortex_x2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
434
- │ │ ├─arm_cortex_x3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
435
- │ │ ├─arm_neoverse_n2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
436
- │ │ └─arm_neoverse_v2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
432
+ │ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
433
+ │ │ ├─arm_cortex_x2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
434
+ │ │ ├─arm_cortex_x3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
435
+ │ │ ├─arm_neoverse_n2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
436
+ │ │ └─arm_neoverse_v2 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 7.50 8.00 / / / / / / / / / / /
437
437
  │ └─v9_2 1.16 1.16 1.55 1.02 1.00 1.51 1.55 1.66 1.66 5.80 6.70 18.44 20.04 19.11 19.75 22.96 19.23 29.29 31.69 40.89 34.73 42.11
438
438
  │ ├─benchmarks 1.35 1.35 2.40 1.03 1.00 1.51 1.84 / / 5.32 7.10 20.38 22.15 21.13 21.83 25.38 21.25 32.38 35.03 45.20 38.39 46.55
439
439
  │ │ └─apple_m4_pro_mbp16 1.35 1.35 2.40 1.03 1.00 1.51 1.84 / / 5.32 7.10 20.38 22.15 21.13 21.83 25.38 21.25 32.38 35.03 45.20 38.39 46.55
440
- │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.31 1.50 1.50 6.33 6.33 / / / / / / / / / / /
441
- │ ├─arm_cortex_x4 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
442
- │ ├─arm_cortex_x925 1.00 1.00 1.00 1.00 1.00 1.50 1.00 1.50 1.50 6.00 6.00 / / / / / / / / / / /
443
- │ └─arm_neoverse_v3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
440
+ │ └─specs 1.00 1.00 1.00 1.00 1.00 1.50 1.31 1.50 1.50 6.33 6.33 / / / / / / / / / / /
441
+ │ ├─arm_cortex_x4 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
442
+ │ ├─arm_cortex_x925 1.00 1.00 1.00 1.00 1.00 1.50 1.00 1.50 1.50 6.00 6.00 / / / / / / / / / / /
443
+ │ └─arm_neoverse_v3 1.00 1.00 1.00 1.00 1.00 1.50 1.50 1.50 1.50 6.50 6.50 / / / / / / / / / / /
444
444
  └─x86 0.21 0.49 1.50 0.98 1.00 1.30 1.97 2.46 2.31 4.98 7.15 15.62 16.40 18.29 23.83 22.58 24.87 28.39 28.70 41.03 41.15 43.35
445
445
  ├─amd 0.25 0.45 1.52 0.99 1.00 1.17 1.22 2.39 2.51 4.74 7.38 18.22 16.50 17.98 24.59 23.73 24.13 28.04 28.30 42.41 40.31 45.11
446
446
  │ ├─2017_zen1 0.34 0.34 1.16 1.00 1.00 1.29 1.34 3.07 3.07 4.18 6.44 63.95 19.71 17.05 32.24 43.83 18.79 30.58 30.27 57.99 39.24 66.55
447
447
  │ │ ├─benchmarks 0.35 0.35 0.58 1.01 1.00 1.24 1.34 / / 4.03 6.23 58.90 18.16 15.70 29.69 40.37 17.30 28.16 27.88 53.41 36.14 61.29
448
448
  │ │ │ └─amd_ryzen_1700x 0.35 0.35 0.58 1.01 1.00 1.24 1.34 / / 4.03 6.23 58.90 18.16 15.70 29.69 40.37 17.30 28.16 27.88 53.41 36.14 61.29
449
- │ │ └─other 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
450
- │ │ └─analysis_uops_info_zen1+ 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
449
+ │ │ └─other 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
450
+ │ │ └─analysis_uops_info_zen1+ 0.33 0.33 2.33 1.00 1.00 1.33 1.33 3.33 3.33 4.33 6.67 / / / / / / / / / / /
451
451
  │ ├─2020_zen3 0.18 0.34 1.16 1.00 1.00 0.98 1.00 2.17 2.34 4.36 6.76 11.69 15.85 16.99 22.46 19.32 21.13 24.05 24.07 38.13 38.04 39.06
452
452
  │ │ ├─benchmark 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.30 6.86 10.33 14.01 15.02 19.86 17.08 18.69 21.26 21.28 33.72 33.63 34.54
453
453
  │ │ │ ├─amd_epyc_7763_linux_github 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.31 6.86 10.35 11.79 15.35 14.36 14.53 22.21 22.45 22.86 30.57 33.34 31.25
454
454
  │ │ │ └─amd_epyc_7763_windows_github 0.10 0.34 0.68 1.00 1.00 1.00 1.00 / / 4.28 6.86 10.32 16.65 14.70 27.48 20.08 15.72 20.14 19.82 37.19 33.92 38.17
455
- │ │ └─other 0.33 0.33 1.97 1.00 1.00 0.95 1.00 2.45 2.65 4.42 6.67 / / / / / / / / / / /
456
- │ │ ├─analysis_agner_fog_r7_5800x 0.33 0.33 1.67 1.00 1.00 / 1.00 2.00 2.33 4.50 6.67 / / / / / / / / / / /
457
- │ │ └─analysis_uops_info_zen3 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 3.00 4.33 6.67 / / / / / / / / / / /
455
+ │ │ └─other 0.33 0.33 1.97 1.00 1.00 0.95 1.00 2.45 2.65 4.42 6.67 / / / / / / / / / / /
456
+ │ │ ├─analysis_agner_fog_r7_5800x 0.33 0.33 1.67 1.00 1.00 / 1.00 2.00 2.33 4.50 6.67 / / / / / / / / / / /
457
+ │ │ └─analysis_uops_info_zen3 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 3.00 4.33 6.67 / / / / / / / / / / /
458
458
  │ ├─2022_zen4 0.15 0.33 1.41 0.99 1.00 0.99 1.00 1.85 1.78 4.41 6.92 10.77 12.47 17.12 20.49 15.83 25.03 24.11 24.56 32.21 35.99 33.32
459
459
  │ │ ├─benchmark 0.07 0.33 1.57 0.97 1.00 0.98 0.99 / / 4.49 6.95 9.97 11.55 15.86 18.98 14.66 23.19 22.34 22.75 29.84 33.34 30.87
460
460
  │ │ │ └─amd_epyc_9r14_ec2_m7a_xlarge 0.07 0.33 1.57 0.97 1.00 0.98 0.99 / / 4.49 6.95 9.97 11.55 15.86 18.98 14.66 23.19 22.34 22.75 29.84 33.34 30.87
461
- │ │ └─other 0.33 0.33 1.28 1.00 1.00 1.01 1.00 2.00 1.92 4.33 6.89 / / / / / / / / / / /
462
- │ │ ├─analysis_agner_fog_r9_7900x 0.33 0.33 1.33 1.00 1.00 / 1.00 2.00 2.00 4.33 7.00 / / / / / / / / / / /
463
- │ │ ├─analysis_uops_info_zen4 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 2.67 4.33 7.00 / / / / / / / / / / /
464
- │ │ └─specs_amd 0.33 0.33 0.67 1.00 1.00 1.00 1.00 1.33 1.33 4.33 6.67 / / / / / / / / / / /
461
+ │ │ └─other 0.33 0.33 1.28 1.00 1.00 1.01 1.00 2.00 1.92 4.33 6.89 / / / / / / / / / / /
462
+ │ │ ├─analysis_agner_fog_r9_7900x 0.33 0.33 1.33 1.00 1.00 / 1.00 2.00 2.00 4.33 7.00 / / / / / / / / / / /
463
+ │ │ ├─analysis_uops_info_zen4 0.33 0.33 2.33 1.00 1.00 1.00 1.00 3.00 2.67 4.33 7.00 / / / / / / / / / / /
464
+ │ │ └─specs_amd 0.33 0.33 0.67 1.00 1.00 1.00 1.00 1.33 1.33 4.33 6.67 / / / / / / / / / / /
465
465
  │ └─2024_zen5 0.39 1.04 2.83 0.95 1.00 1.50 1.68 2.64 3.08 6.31 9.84 13.71 19.04 21.09 24.62 23.64 34.12 34.84 35.83 45.40 49.16 47.78
466
466
  │ ├─benchmark 0.21 1.53 2.95 0.91 1.00 1.36 1.87 / / 6.12 9.69 13.33 18.50 20.50 23.94 22.98 33.17 33.87 34.83 44.14 47.79 46.45
467
467
  │ │ └─amd_epyc_9r45_ec2_m8a_xlarge 0.21 1.53 2.95 0.91 1.00 1.36 1.87 / / 6.12 9.69 13.33 18.50 20.50 23.94 22.98 33.17 33.87 34.83 44.14 47.79 46.45
468
- │ └─other 0.71 0.71 2.72 1.00 1.00 1.66 1.50 2.72 3.17 6.50 10.00 / / / / / / / / / / /
469
- │ ├─analysis_agner_fog_r7_9800x3d 1.00 1.00 3.00 1.00 1.00 / 1.50 3.00 3.50 6.50 10.00 / / / / / / / / / / /
470
- │ └─specs_amd 0.50 0.50 / 1.00 1.00 1.50 1.50 / / 6.50 10.00 / / / / / / / / / / /
468
+ │ └─other 0.71 0.71 2.72 1.00 1.00 1.66 1.50 2.72 3.17 6.50 10.00 / / / / / / / / / / /
469
+ │ ├─analysis_agner_fog_r7_9800x3d 1.00 1.00 3.00 1.00 1.00 / 1.50 3.00 3.50 6.50 10.00 / / / / / / / / / / /
470
+ │ └─specs_amd 0.50 0.50 / 1.00 1.00 1.50 1.50 / / 6.50 10.00 / / / / / / / / / / /
471
471
  └─intel 0.18 0.53 1.47 0.98 1.00 1.45 3.17 2.53 2.14 5.23 6.93 13.38 16.30 18.60 23.09 21.50 25.64 28.75 29.11 39.70 42.01 41.67
472
472
  ├─2017_coffee_lake_gen_8 0.14 0.40 1.12 0.98 1.00 1.03 1.99 1.69 1.69 3.54 4.56 10.27 16.31 12.42 19.10 21.50 12.84 20.48 20.47 32.65 28.21 35.74
473
473
  │ ├─benchmarks 0.08 0.63 1.73 0.96 1.00 1.05 1.99 / / 3.45 4.78 10.69 16.98 12.92 19.88 22.38 13.37 21.31 21.31 33.99 29.36 37.20
474
474
  │ │ ├─intel_i7_8550U_windows 0.08 0.44 1.69 1.01 1.00 1.01 2.00 / / 3.15 4.79 7.02 15.44 11.99 30.07 21.33 13.00 17.80 17.21 32.36 28.09 35.06
475
475
  │ │ └─intel_i7_8700B_macos_github_actions 0.08 0.91 1.77 0.92 1.00 1.10 1.97 / / 3.78 4.77 16.30 18.68 13.93 13.15 23.47 13.74 25.51 26.38 35.70 30.68 39.48
476
- │ └─other 0.25 0.25 0.73 1.00 1.00 1.00 2.00 1.62 1.62 3.62 4.36 / / / / / / / / / / /
477
- │ ├─analysis_agner_fog_coffee_lake 0.25 0.25 / 1.00 1.00 1.00 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
478
- │ └─analysis_uops_info_coffee_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
476
+ │ └─other 0.25 0.25 0.73 1.00 1.00 1.00 2.00 1.62 1.62 3.62 4.36 / / / / / / / / / / /
477
+ │ ├─analysis_agner_fog_coffee_lake 0.25 0.25 / 1.00 1.00 1.00 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
478
+ │ └─analysis_uops_info_coffee_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
479
479
  ├─2019_sunny_cove_gen_10 0.10 0.33 0.92 0.95 1.00 0.98 1.94 1.60 1.60 3.58 4.54 12.27 9.43 14.01 17.18 13.39 20.23 19.23 19.83 28.71 29.72 28.95
480
480
  │ ├─benchmarks 0.04 0.44 1.30 0.91 1.00 1.00 1.89 / / 3.50 4.60 11.82 9.08 13.49 16.55 12.90 19.48 18.52 19.09 27.65 28.63 27.88
481
481
  │ │ └─intel_xeon_8375c_ice_lake_ec2_m6i_xlarge 0.04 0.44 1.30 0.91 1.00 1.00 1.89 / / 3.50 4.60 11.82 9.08 13.49 16.55 12.90 19.48 18.52 19.09 27.65 28.63 27.88
482
- │ └─other 0.25 0.25 0.66 1.00 1.00 0.97 2.00 1.66 1.66 3.66 4.49 / / / / / / / / / / /
483
- │ ├─analysis_agner_fog_ice_lake 0.25 0.25 0.50 1.00 1.00 / 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
484
- │ ├─analysis_uops_info_ice_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
485
- │ └─analysis_uops_info_tiger_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
482
+ │ └─other 0.25 0.25 0.66 1.00 1.00 0.97 2.00 1.66 1.66 3.66 4.49 / / / / / / / / / / /
483
+ │ ├─analysis_agner_fog_ice_lake 0.25 0.25 0.50 1.00 1.00 / 2.00 1.50 1.50 3.50 4.00 / / / / / / / / / / /
484
+ │ ├─analysis_uops_info_ice_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
485
+ │ └─analysis_uops_info_tiger_lake 0.25 0.25 0.75 1.00 1.00 1.00 2.00 1.75 1.75 3.75 4.75 / / / / / / / / / / /
486
486
  ├─2021_golden_cove_gen_12 0.23 0.64 1.76 0.99 1.00 1.80 4.05 3.11 2.63 6.34 8.58 14.98 18.37 21.93 25.63 24.02 32.77 34.73 35.06 44.04 50.72 46.59
487
487
  │ ├─benchmarks 0.13 0.99 2.52 0.98 1.00 1.99 5.03 / / 6.80 9.74 16.28 19.97 23.84 27.86 26.11 35.63 37.76 38.12 47.88 55.14 50.65
488
488
  │ │ └─intel_xeon_8488c_sapphire_rapids_ec2_m7i_xlarge 0.13 0.99 2.52 0.98 1.00 1.99 5.03 / / 6.80 9.74 16.28 19.97 23.84 27.86 26.11 35.63 37.76 38.12 47.88 55.14 50.65
489
- │ └─other 0.41 0.41 1.22 1.00 1.00 1.63 3.27 2.86 2.42 5.92 7.55 / / / / / / / / / / /
490
- │ ├─analysis_uops_info_alder_lake_p 0.33 0.33 1.00 1.00 1.00 1.33 2.67 2.33 2.33 5.00 6.33 / / / / / / / / / / /
491
- │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
489
+ │ └─other 0.41 0.41 1.22 1.00 1.00 1.63 3.27 2.86 2.42 5.92 7.55 / / / / / / / / / / /
490
+ │ ├─analysis_uops_info_alder_lake_p 0.33 0.33 1.00 1.00 1.00 1.33 2.67 2.33 2.33 5.00 6.33 / / / / / / / / / / /
491
+ │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
492
492
  ├─2022_raptor_cove_gen_13_14 0.26 0.71 1.96 1.00 1.00 2.00 4.51 3.55 2.53 7.00 9.49 15.73 19.93 24.00 28.64 26.02 35.73 37.86 38.33 49.02 55.79 51.16
493
493
  │ ├─benchmarks 0.13 1.00 2.55 1.00 1.00 2.00 5.08 / / 7.00 10.00 15.95 20.20 24.33 29.03 26.37 36.21 38.37 38.85 49.69 56.55 51.86
494
494
  │ │ └─intel_xeon_8559c_emerald_rapids_ec2_i7i_xlarge 0.13 1.00 2.55 1.00 1.00 2.00 5.08 / / 7.00 10.00 15.95 20.20 24.33 29.03 26.37 36.21 38.37 38.85 49.69 56.55 51.86
495
- │ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
496
- │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
495
+ │ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
496
+ │ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
497
497
  └─2023_redwood_cove_ultra_1 0.24 0.71 1.95 0.99 1.00 1.73 4.51 3.46 2.47 6.97 9.47 14.44 20.41 24.32 27.29 25.53 36.40 37.92 38.32 48.75 55.19 50.95
498
498
  ├─benchmarks 0.12 1.01 2.53 0.98 1.00 1.50 5.09 / / 6.94 9.96 14.28 20.19 24.06 26.99 25.26 36.01 37.51 37.91 48.22 54.60 50.40
499
499
  │ └─intel_xeon_6975p_granite_rapids_ec2_m8i_xlarge 0.12 1.01 2.53 0.98 1.00 1.50 5.09 / / 6.94 9.96 14.28 20.19 24.06 26.99 25.26 36.01 37.51 37.91 48.22 54.60 50.40
500
- └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
501
- └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
502
-
500
+ └─other 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
501
+ └─specs_intel 0.50 0.50 1.50 1.00 1.00 2.00 4.00 3.50 2.50 7.00 9.00 / / / / / / / / / / /
502
+
503
503
 
504
504
  ```
505
505
 
@@ -536,7 +536,7 @@ CountedFloat is 37.3x slower than float
536
536
  - currently any non-Python-built-in math operations are not counted (e.g. `numpy`)
537
537
  - not all Python built-in math operations are counted (e.g. hyperbolic functions)
538
538
  - flop weights should be taken with a grain of salt and should only provide relative ballpark estimates w.r.t computational complexity. Production implementations in a compiled language could have vastly differing performance depending on cpu cache sizes, branch prediction misses, compiler optimizations using vector operations (AVX etc...), etc...
539
-
539
+
540
540
  # Appendix A - Flop counting / analysis details
541
541
 
542
542
  This appendix provides detailed information about how each floating-point operation (FLOP) type is counted and analyzed in the `counted-float` package. All `math.*` entries below assume an active `FlopCountingContext` (outside one, the `math` module is not instrumented). For each flop type, you will find:
@@ -698,4 +698,4 @@ This appendix provides detailed information about how each floating-point operat
698
698
  - **ARM:** (software)
699
699
  - **x86:** (software)
700
700
  - **Counted Python operations:** `math.tan(x)` for `CountedFloat`
701
- - **Not counted:** `tan` on non-CountedFloat, `numpy.tan
701
+ - **Not counted:** `tan` on non-CountedFloat, `numpy.tan
@@ -1,3 +1,5 @@
1
+ """Top-level public API for flop counting: CountedFloat, FlopCountingContext, and related models."""
2
+
1
3
  import counted_float.benchmarking as benchmarking
2
4
  import counted_float.config as config
3
5
 
@@ -5,8 +7,6 @@ from ._core.counting import BuiltInData, CountedFloat, FlopCountingContext, Paus
5
7
  from ._core.models import FlopCounts, FlopType, FlopWeights, Quantiles, SystemInfo
6
8
 
7
9
  __all__ = [
8
- "benchmarking",
9
- "config",
10
10
  "CountedFloat",
11
11
  "FlopCountingContext",
12
12
  "FlopCounts",
@@ -15,4 +15,6 @@ __all__ = [
15
15
  "PauseFlopCounting",
16
16
  "Quantiles",
17
17
  "SystemInfo",
18
+ "benchmarking",
19
+ "config",
18
20
  ]