NVIDIA / NVIDIA/cudf

[FEA] cudf.pandas profiler should show time taken by other, non-pandas functions to run.

Open
#15,482 0 comments 0 reactions 0 assignees View on GitHub
cudf.pandas feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

This is a bit different from https://github.com/rapidsai/cudf/issues/14499.

The `cudf.pandas` profiler only shows the time it takes for pandas functions and methods to run; but it doesn't report the time it takes for other functions and methods. It would be useful if the total time reported by the profiler matched up roughly with the actual total wall clock time of the program.

For example:

```
In [1]: %load_ext cudf.pandas

In [2]: import pandas as pd

In [3]: import time

In [4]: def fun1():
...: time.sleep(5)
...:

In [5]: def fun2():
...: s = pd.Series([1, 2, 3])
...: s.max()
...: s.min()
...:

In [6]: %%cudf.pandas.profile
...: fun1()
...: fun2()
...:
...:

Total time elapsed: 6.345 seconds
3 GPU function calls in 1.090 seconds
0 CPU function calls in 0.000 seconds

Stats

┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Function ┃ GPU ncalls ┃ GPU cumtime ┃ GPU percall ┃ CPU ncalls ┃ CPU cumtime ┃ CPU percall ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ Series │ 1 │ 1.088 │ 1.088 │ 0 │ 0.000 │ 0.000 │
│ Series.max │ 1 │ 0.001 │ 0.001 │ 0 │ 0.000 │ 0.000 │
│ Series.min │ 1 │ 0.001 │ 0.001 │ 0 │ 0.000 │ 0.000 │
└────────────┴────────────┴─────────────┴─────────────┴────────────┴─────────────┴─────────────┘
```

It would be great if the result was something like:

```
Total time elapsed: 6.345 seconds
3 GPU function calls in 1.090 seconds
0 CPU function calls in 0.000 seconds

Stats

┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Function ┃ GPU ncalls ┃ GPU cumtime ┃ GPU percall ┃ CPU ncalls ┃ CPU cumtime ┃ CPU percall ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ Series │ 1 │ 1.088 │ 1.088 │ 0 │ 0.000 │ 0.000 │
│ Series.max │ 1 │ 0.001 │ 0.001 │ 0 │ 0.000 │ 0.000 │
│ Series.min │ 1 │ 0.001 │ 0.001 │ 0 │ 0.000 │ 0.000 │
│ Others │ - │ - │ - │ - │ 5.000 │ 5.000 │
└────────────┴────────────┴─────────────┴─────────────┴────────────┴─────────────┴─────────────┘
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.