Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looping example #169

Merged
merged 9 commits into from
Sep 20, 2024
Merged

Looping example #169

merged 9 commits into from
Sep 20, 2024

Conversation

jatkinson1000
Copy link
Member

The PR adds an example to demonstrate how best to structure code when inference is being called many times as part of an iterative procedure.

It demonstrates two approaches, the 'bad' naive way following exercise 1, and the 'good' substructured way.

Users are guided through both codes before building and then and timing them to see the significant performance increase of the 'good' approach.

Review of the explanations, instructions, code, and a check that things can be build and run correctly appreciated.

@jatkinson1000 jatkinson1000 self-assigned this Sep 13, 2024
@jatkinson1000 jatkinson1000 added documentation Improvements or additions to documentation hackathon labels Sep 13, 2024
@jatkinson1000 jatkinson1000 force-pushed the looping-example branch 2 times, most recently from 8745513 to 1825824 Compare September 13, 2024 20:48
Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me, thanks @jatkinson1000. Just some minor comments and suggestions.

examples/5_Looping/CMakeLists.txt Outdated Show resolved Hide resolved
examples/5_Looping/README.md Outdated Show resolved Hide resolved
examples/5_Looping/README.md Outdated Show resolved Hide resolved
@@ -3,5 +3,6 @@ if(CMAKE_BUILD_TESTS)
add_subdirectory(2_ResNet18)
# add_subdirectory(3_MultiGPU)
add_subdirectory(4_MultiIO)
add_subdirectory(5_Autograd)
# add_subdirectory(5_Looping)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this gets merged first then I can add tests for it in #166.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an option, though I think this one isn't really 'testing' anything, but rather demonstrating, so for the sake of saving time/resource in the test suite it could be left.
I'll let you decide in #166

@jatkinson1000 jatkinson1000 merged commit e0d8269 into main Sep 20, 2024
6 checks passed
@jatkinson1000 jatkinson1000 deleted the looping-example branch September 20, 2024 09:49
@jatkinson1000 jatkinson1000 linked an issue Sep 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation hackathon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create example demonstrating multiple calls to inference
2 participants