refactor(ops): migrate GELU and sigmoid to canonical InfiniOps APIs - #1473
Closed
voltjia wants to merge 1 commit into
Closed
refactor(ops): migrate GELU and sigmoid to canonical InfiniOps APIs#1473voltjia wants to merge 1 commit into
voltjia wants to merge 1 commit into
Conversation
Collaborator
Author
|
Superseded by #1480, which consolidates the canonical InfiniOps adapter migrations while preserving each logical change as a separate commit. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GeluInfinilmandGelutanhInfinilmto canonicalGelunoneandtanhapproximation modes explicitlySigmoidInfinilmto canonicalSigmoidAPI alignment
GeluInfinilm::Call(handle, config, input, approximate, out)Gelu::Call(handle, config, input, approximate, out)torch.nn.functional.gelu(input, approximate='none'). The ordinary adapter passesnone; the tanh adapter passestanh. InfiniOps adds an explicit trailing output tensor.SigmoidInfinilm::Call(handle, config, input, out)Sigmoid::Call(handle, config, input, out)torch.sigmoid(input, *, out=None). InfiniOps represents the optional Python output as its required trailing C++ output tensor.Dependency
This PR is based on
refactor/migrate-paged-caching-infiniops/ #1467 and advances the InfiniOps gitlink frome733e325to498c9aaa, the head of InfiniOps #889, which adds canonical CUDA-compatible GELU and sigmoid providers.Against #1467, this PR changes three adapter files and the InfiniOps gitlink.
Validation
Validated commit
37b8fb8bremotely onssh nvidiawithaccelerator-dev/nvidia:latest, using the exact InfiniOps #889 head498c9aaain a temporary integration merge:_infinicorewith the canonicalgeluandsigmoidproviders in the wrapper allowlistpython3 test/infinicore/ops/sigmoid.py --nvidia: 45/45 passedinfinicore::op::geluandinfinicore::op::gelu_tanh; both outputs matched host referencesclang-format 16.0.6 --dry-run --Werrorpassed for all three changed C++ filesgit diff --checkpassed