Skip to content

Conversation

@SeanNaren
Copy link
Contributor

@SeanNaren SeanNaren commented Jul 1, 2021

What does this PR do?

Follow-on from #8223. This will follow along from the conversation I had with @davors72, allowing the poptorch.Options that are passed into the IPUPlugin to be the source of truth, allowing the user to not have to pass any flags directly to the Trainer. I.e:

inference_opts = poptorch.Options()
inference_opts.replicationFactor(4)
inference_opts.deviceIterations(2)
inference_opts.Training.gradientAccumulation(1)

training_opts = poptorch.Options()
training_opts.replicationFactor(4)
training_opts.deviceIterations(2)
training_opts.Training.gradientAccumulation(2)

trainer = pl.Trainer(max_epochs=2, plugins=IPUPlugin(training_opts=training_opts, inference_opts=inference_opts))

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #8233 (0d6f8c5) into master (f3e74ab) will decrease coverage by 1%.
The diff coverage is 56%.

@@          Coverage Diff           @@
##           master   #8233   +/-   ##
======================================
- Coverage      93%     92%   -1%     
======================================
  Files         212     213    +1     
  Lines       13718   13803   +85     
======================================
- Hits        12749   12737   -12     
- Misses        969    1066   +97     

@SeanNaren SeanNaren force-pushed the fix/ipu_custom_manual branch from 6ed2cbb to e78c154 Compare July 2, 2021 11:31
@SeanNaren SeanNaren changed the title [Blocked by #8223][IPU] Allow poptorch.Options to override Trainer [IPU] Allow poptorch.Options to override Trainer Jul 2, 2021
@SeanNaren SeanNaren added accelerator: ipu (removed) Intelligence Processing Unit feature Is an improvement or enhancement labels Jul 2, 2021
@SeanNaren SeanNaren added this to the v1.4 milestone Jul 2, 2021
@SeanNaren SeanNaren self-assigned this Jul 2, 2021
@SeanNaren SeanNaren marked this pull request as ready for review July 5, 2021 11:09
@awaelchli awaelchli added the ready PRs ready to be merged label Jul 5, 2021
SeanNaren added 2 commits July 5, 2021 14:12
@SeanNaren SeanNaren enabled auto-merge (squash) July 5, 2021 13:40
@SeanNaren SeanNaren merged commit 6d55896 into master Jul 5, 2021
@SeanNaren SeanNaren deleted the fix/ipu_custom_manual branch July 5, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accelerator: ipu (removed) Intelligence Processing Unit feature Is an improvement or enhancement ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants