Skip to content

Conversation

ianthomas23
Copy link
Contributor

This PR adds a framework for benchmarking xarray-spatial and includes benchmarks for slope and viewshed for both CPU and GPU/rtxpy algorithms. It closes issue #583.

The idea is that developers will add benchmarks for other algorithms so that eventually we have full coverage.

Documentation is included in benchmarks/README.md.

Example of command-line output for the slope algorithm:

  ======= ============= =============
  --                  type           
  ------- ---------------------------
     nx       numpy          cupy    
  ======= ============= =============
    100      610±30μs    1.32±0.08ms 
    300    1.77±0.09ms   1.25±0.04ms 
    1000    14.8±0.2ms   1.52±0.02ms 
    3000     135±5ms      2.81±0.1ms 
   10000    1.28±0.03s    30.7±0.8ms 
  ======= ============= =============
  started: 2021-12-10 13:11:21, duration: 28.0s

and screenshot of the web page output:
asv
showing that on my dev machine the cupy algorithm is ~1.5 orders of magnitude faster than the numpy one for decent problem sizes.

@ianthomas23 ianthomas23 merged commit 77af6c0 into makepath:master Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant