-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
discussion requiredSome discussion necessary to decide how to address this issueSome discussion necessary to decide how to address this issuedocumentationImprovements or additions to documentationImprovements or additions to documentationtestsPertaining to SCICO testsPertaining to SCICO tests
Description
We should decide what input_dtype and output_dtype mean, then document it.
Proposed input_dtype and output_dtype policy:
- All instantiated
Operators must haveinput_dtypeandoutput_dtypeproperties- Possible data types are
snp.float32,snp.float64,snp.complex64
- Possible data types are
- at the level of
Operator, we should callsnp.dtype(input_dtype)to make sure it is a dtype and not a type- compare
print(snp.float32)andprint(snp.dtype(snp.float32)), second has nice repl
- compare
- For an
OperatorH,H(x)should throw an error ifx.dtypeis notinput_dtype- Instead: how about input_dtype is the "largest" dtype allowed, passing a "smaller" one is allowed
- Would this still work on the adjoint? NO, so largest dtype does not work
- Instead: how about input_dtype is the "largest" dtype allowed, passing a "smaller" one is allowed
Operators should be written so thatH(x).dtypeisH.output_dtype; this will not be checked and runtime, but should be testedOperators should attempt to automatically deduceinput_dtypeandoutput_dtypefrom other arguments and throw an error if the user requests aninput_dtypeoroutput_dtypethat is not realizable
This policy should be described in the docs and implemented in the code.
Metadata
Metadata
Assignees
Labels
discussion requiredSome discussion necessary to decide how to address this issueSome discussion necessary to decide how to address this issuedocumentationImprovements or additions to documentationImprovements or additions to documentationtestsPertaining to SCICO testsPertaining to SCICO tests