-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from duggalsu/benchmark_scripts
Benchmark scripts
- Loading branch information
Showing
8 changed files
with
47 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
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
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,15 @@ | ||
from PIL import Image | ||
from core.operators import image_vec_rep_resnet | ||
|
||
|
||
def profile_code(): | ||
image_vec_rep_resnet.initialize(param=None) | ||
image_path = r"core/operators/sample_data/text.png" | ||
image = Image.open(image_path) | ||
example_image_obj = {"image": image} | ||
image_vec_rep_resnet.run(example_image_obj) | ||
print("Image vec profiler complete!") | ||
|
||
|
||
if __name__ == "__main__": | ||
profile_code() |
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,4 @@ | ||
#! /bin/bash | ||
current_time=$(date "+%Y.%m.%d-%H.%M.%S") | ||
python -m memray run -o image_vec_rep_resnet.$current_time.bin image_vec_operator_profile.py | ||
tail -f /dev/null |
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,4 @@ | ||
#! /bin/bash | ||
current_time=$(date "+%Y.%m.%d-%H.%M.%S") | ||
pyinstrument -r speedscope -o speedscope_image_vec_rep_resnet.$current_time.json image_vec_operator_profile.py | ||
tail -f /dev/null |
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,12 @@ | ||
from core.operators import vid_vec_rep_resnet | ||
|
||
|
||
def profile_code(): | ||
file_path = {"path": r"core/operators/sample_data/sample-cat-video.mp4"} | ||
vid_vec_rep_resnet.initialize(param=None) | ||
vid_vec_rep_resnet.run(file_path) | ||
print("Video vec profiler complete!") | ||
|
||
|
||
if __name__ == "__main__": | ||
profile_code() |
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,4 @@ | ||
#! /bin/bash | ||
current_time=$(date "+%Y.%m.%d-%H.%M.%S") | ||
python -m memray run -o vid_vec_rep_resnet.$current_time.bin video_vec_operator_profile.py | ||
tail -f /dev/null |
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,4 @@ | ||
#! /bin/bash | ||
current_time=$(date "+%Y.%m.%d-%H.%M.%S") | ||
pyinstrument -r speedscope -o speedscope_vid_vec_rep_resnet.$current_time.json video_vec_operator_profile.py | ||
tail -f /dev/null |