Skip to content

Only check that arguments are Variables in VariableType#4991

Merged
colesbury merged 3 commits intopytorch:masterfrom
colesbury:unpack_any
Feb 1, 2018
Merged

Only check that arguments are Variables in VariableType#4991
colesbury merged 3 commits intopytorch:masterfrom
colesbury:unpack_any

Conversation

@colesbury
Copy link
Copy Markdown
Member

Don't check the ScalarType and Backend of arguments in VariableType.
Instead, only check that arguments are Variables of any type. The
precise type checks are handled by the base type.

Many of our functions take heterogeneous types. There isn't enough
information in Declarations.yaml to ensure the precise types of
arguments in VariableType, which makes it difficult to add new methods.

This is #4943 with a fix to the memset call

Don't check the ScalarType and Backend of arguments in VariableType.
Instead, only check that arguments are Variables of any type. The
precise type checks are handled by the base type.

Many of our functions take heterogeneous types. There isn't enough
information in Declarations.yaml to ensure the precise types of
arguments in VariableType, which makes it difficult to add new methods.
@colesbury colesbury merged commit a8bda67 into pytorch:master Feb 1, 2018
@colesbury colesbury deleted the unpack_any branch February 1, 2018 19:56
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Don't check the ScalarType and Backend of arguments in VariableType.
Instead, only check that arguments are Variables of any type. The
precise type checks are handled by the base type.

Many of our functions take heterogeneous types. There isn't enough
information in Declarations.yaml to ensure the precise types of
arguments in VariableType, which makes it difficult to add new methods.

This is pytorch#4943 with a fix to the memset call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants