-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## tests and utils | ||
|
||
This is intended for development and includes unit tests and profiling utils. The code relies on a proper version of SpikeInterface with hs-detection integrated. | ||
|
||
The test on correctness is performed using a small dataset, the same as the one used in SI tests. The identical results compared to HS2 are not enforced due to behaviour differences, but could be helpful in development. | ||
|
||
The performance profiling uses different profiler packages and produces different kinds of reports. The `PROFILE` flag in [setup.py](../setup.py#L33) should be set properly for Cython profiling: 0 to turn off, 1 to profile function calls, and 2 to profile line traces. | ||
|
||
The script [useful.sh](./useful.sh) contains some command lines useful to development, and are used to inspect and optimize. | ||
|
||
The code in [cpp_mode](./cpp_mode) builds to a pure C++ program running the detection algorithm. Without the Python overhead, it's easier to profile performance bottlenecks in detail. In the Dissertation, the Intel Vtune Profiler is employed to perform event-based profiling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# all in repo root dir | ||
|
||
# rebuild c++ code only | ||
python setup.py build_ext -i -f | ||
|
||
# recuild cython, -a for annotated report, -Wextra for all warnings | ||
cython -a -3 --cplus -Wextra detect.py | ||
|
||
# inspect asm code of main detection loops | ||
objdump -S -r -M intel --insn-width 8 build/temp.linux-x86_64-cpython-39/hs_detection/detect/Detection.o > Detection.s | ||
|
||
# profile with Intel Vtune | ||
vtune -collect hotspots --app-working-dir=. -- python tests/test_run.py 10 |