-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Merge 2020-06-30 into tensorflow #32623
Merged
Merged
Conversation
This file contains 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
Use TangentStoredPropertyRequest in differentiation transform. Improve non-differentiability diagnostics regarding invalid stored property projection instructions: `struct_extract`, `struct_element_addr`, `ref_element_addr`. Diagnose the following cases: - Original property's type does not conform to `Differentiable`. - Base type's `TangentVector` is not a struct. - Tangent property not found: base type's `TangentVector` does not have a stored property with the same name as the original property. - Tangent property's type is not equal to the original property's `TangentVector` type. - Tangent property is not a stored property. Resolves TF-969 and TF-970.
This adjusts the target specific argument handling to use the same logic as the toolchain, and in doing so, silences the spurious warnings when building with a MSVC toolchain.
This dependency is already recorded in the `importInfo`'s `ModuleNames`.
The new function swift_compareProtocolConformanceDescriptors calls through to the preexisting code in MetadataCacheKey which has been extracted out from MetadataCacheKey::compareWitnessTables into a new public static function MetadataCacheKey::compareProtocolConformanceDescriptors. The new function's availability is "future" for now.
…uring testing. Seems that Android ARM 32 bits, which uses linux-androideabi as OS generates code that is ABI stable. Mark the OS as ABI stable, as it was already for Android ARM 64 bits. There's also some white space removal in unrelated lines.
…erty [AutoDiff] Improve invalid stored property projection diagnostics.
[DepScan] NFC: Remove check for OnoneSupport
…nsparent stdlib vs non-stdlib functions. I am going to be moving back ownership lowering first in the stdlib so that we can bring up the optimizer on ownership without needing to deal with serialization issues (the stdlib doesn't deserialize SIL from any other modules). This patch just begins the mechanical process with a nice commit message. Should be NFC.
…eProtocolConformanceDescriptors
Previously, the metadata accessor for a generic type for which some metadata prespecialization was done only tested that the type metadata arguments were equal to those of the prespecialization. If the generic type had an argument which was constrained to conform to a protocol, the particular conformance to that protocol was determined at compile time, but the conformance was ignored in the metadata accessor. As a result it was possible--in certain multi-module cases--for the metadata accessor to incorrectly return a prespecialized metadata record whose type arguments matched the type arguments passed to the accessor but whose conformance arguments did not. For example, given the following, Base: struct K {} protocol P {} Conformance1: import Base struct G<T : P> {} extension K : P {} // first conformance prespecialize( G<K>.self ) Conformance2: import Base extension K : P {} // second conformance the metadata accessor for G defined in Conformance1 would behave like MetadataResponse `metadata accessor for G`( MetadataRequest request, const Metadata *M, const WitnessTable *WT) { if (M == `type metadata for K`) { return `canonical prespecialized type metadata for G<K>` } return swift_getGenericMetadata(request, {M, WT}); } Here, the WitnessTable argument is the witness table describing a conformance of the type whose metadata is provided to the protocol P. The incorrect behavior occurs when calling the metadata accessor with these arguments: `some request` `type metadata for K` `protocol witness table for Base.K : Base.P in Conformance2` The accessor would return the `canonical prespecialized type metadata for G<K>`. The problem is that the prespecialized metadata contains the following generic arguments: `type metadata for K` `protocol witness table for Base.K : Base.P in Conformance1` Specificallly, the witness table is for the conformance from Conformance1, not the conformance from Conformance2. Here, the problem is addressed by testing that the witness tables passed into the accessor are for the same conformance as the witness table referred to by the prespecialized record. Now, the metadata accessor for G will behave like MetadataResponse `metadata accessor for G`( MetadataRequest request, const Metadata *M, const WitnessTable *WT) { if (M == `type metadata for K` swift_compareProtocolConformanceDescriptors( WT->getDescription(), `protocol conformance descriptor for Base.K : Base.P in Conformance1`) ) { return `canonical prespecialized type metadata for G<K>` } return swift_getGenericMetadata(request, {M, WT}); } Consequently, when the accessor is called with the same arguments as before, the call to swift_compareProtocolConformanceDescriptors will return false and the non-matching prespecialized metadata will not be returned.
…in explicit Swift module maps. NFC
Improvements for cross-module-optimization
[android] Set linux-androideabi (Android ARM 32 bits) as ABI stable during testing.
build: correct handling of argument generation
In order to access `stdin`, `stdout` as binary, you must use the `buffer` member in Python 3. The replacement of the binary data requires that pattern and the replacement be byte objects. Convert the pattern and replacement to UTF-8 encoded bytes.
Make `remote-run` be compatible with python 2 and python 3. The changes are: - replace `viewitems` with `items` - replace `viewvalues` with `values` - replace `viewkeys` with `keys` - replace `haskey` with `in`
ExplicitModules: use key names conforming to Swift naming convention in explicit Swift module maps. NFC
Give OptionSet an initializer_list constructor
[ConstraintSystem] Rework handling of object literal expressions
Update master branch for Xcode 12 beta
…#32568)" This reverts commit 621b3b4. The driver is double faulting on my Linux box (Fedora 32 / x86-64). It crashes due to heap corruption, then hangs trying to introspect and print the stack. There also appears to be an unrelated(?) uninitialized memory error that valgrind detects (as opposed to malloc's own self diagnostics).
[Dependency Scanner] Use `pragma clang module import` in the hack file used to invoke the clang dependency scanner.
[NFC] Add a test for constraint generation failures in a pattern binding decl inside of a function builder
test: attempt to quote python interpreter path
…eq-rdar64782333 [SourceKit] Enable ASTContext caching in other completion-like requests
Mimic changes in upstream commit: faa06bf Context: #32581 (comment)
Please test with following PRs: @swift-ci Please clean test TensorFlow |
@swift-ci please test Linux platform |
@swift-ci Please clean test TensorFlow |
Build failed |
@swift-ci Please clean test TensorFlow |
@swift-ci Please test tensorflow |
This was referenced Jul 1, 2020
Remove `LoadExpr` and `InjectIntoOptionalExpr`: creating instances of these `ImplicitConversionExpr` subclasses causes an assertion failure in `ConstraintGenerator::visitImplicitConversionExpr`. This changes seem necessary after changes to `SanitizeExpr` in 0232cd0.
Fix base tangent type calculation.
@swift-ci Please test tensorflow |
This was referenced Jul 3, 2020
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.
No description provided.