Skip to content
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

Develop upstream sync 240521 #2548

Merged
merged 482 commits into from
Jun 5, 2024

Conversation

draganmladjenovic
Copy link

No description provided.

tensorflower-gardener and others added 30 commits May 15, 2024 20:00
PiperOrigin-RevId: 634161496
PiperOrigin-RevId: 634170429
…KindInfo()`

Checking `GetEnableMemories()` inside `PyDeviceList::PopulateMemoryKindInfo()` causes the memory kind to be built/cached based on the value of `enable_memories` at the time the method was called for the first time. This is problematic when users later change the value of `enable_memories` but reuse the same device list.

This CL fixes the problem by making `PyDeviceList::MemoryKinds()` and `PyDeviceList::DefaultMemoryKind()` always check for `GetEnableMemories()` outside the cached method to make it behave correctly even if `enable_memories` changes.

PiperOrigin-RevId: 634191502
PiperOrigin-RevId: 634193569
`xla::ifrt::RemapPlan`'s `mappings` is frequently reused across different
`xla::ifrt::RemapPlan`. It can be costly to keep a copy of `mappings` for each
plan if the mappings is not trivially small.

This change wraps `mappings` with `std::shared_ptr` so that it can be shared
more cheaply across multiple plans.

PiperOrigin-RevId: 634214931
PiperOrigin-RevId: 634224863
… tests.

Imported from GitHub PR openxla/xla#12538

Copybara import of the project:

--
78d74154a1693426014eef2940e759d1e36902ed by Ilia Sergachev <[email protected]>:

[GPU] Fix OSS compilation of previously disabled tests.

Merging this change closes tensorflow#12538

PiperOrigin-RevId: 634248275
PiperOrigin-RevId: 634257201
The previous logic for filtering by-module wasn't correct, as instructions
could be modified after autotuning, resuling in not all relevant information
serialized.

This could result in excessive data serialized, but autotuning results are very
small compared to the module size and the compiled artifact.

PiperOrigin-RevId: 634259538
…mRewriter pass.

PiperOrigin-RevId: 634263367
PiperOrigin-RevId: 634268437
XLA should not include any platform specific headers in XLA header files. This change moves us one step closer to this goal by getting rid of type aliases in `gpu_types.h`.

PiperOrigin-RevId: 634278649
PiperOrigin-RevId: 634279450
PiperOrigin-RevId: 634285627
Imported from GitHub PR openxla/xla#12501

Copybara import of the project:

--
97b50d47877dd3dc46535c6fa34f0e449ee57bfe by Ilia Sergachev <[email protected]>:

[NFC] Fix mistypes in scatter expander.

Merging this change closes tensorflow#12501

PiperOrigin-RevId: 634285954
PiperOrigin-RevId: 634288224
…fusion_analysis.

This is a pure HLO pass that does not require a GPU.

PiperOrigin-RevId: 634303515
This is used as an input to mlir_replay. Note that GPU-specific ops are
not implemented in the interpreter yet (at HEAD).

PiperOrigin-RevId: 634304231
…keep track of the cache path.

PiperOrigin-RevId: 634308967
For this to work, we need a folder, so add that too. We kind of
rely on the folder to work most of the time (for caching of
instructions). There may be some dragons here, I'll probably rewrite
that stuff at some point.

This works around the remaining known miscompiles. The issue
must be somewhere in LLVM and be related to GEPs with subtractions,
but I lack the skills and resources to actually track it down.

PiperOrigin-RevId: 634326550
PiperOrigin-RevId: 634330969
…m_algorithm_picker.

These defines are not needed since the BUILD target is anyway guarded by if_gpu_is_configured.

PiperOrigin-RevId: 634353818
@draganmladjenovic
Copy link
Author

draganmladjenovic commented May 29, 2024

https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

--config=warnings?

@i-chaochen
Copy link

@draganmladjenovic I think you will upstream this profiler as well later?

Copy link

@i-chaochen i-chaochen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could try to enable this cudnn_fused_conv_rewriter_test this week as openxla/xla#9666 is merged

@draganmladjenovic
Copy link
Author

retest Ubuntu-GPU-multi please
retest Ubuntu-CPU please

@draganmladjenovic
Copy link
Author

We could try to enable this cudnn_fused_conv_rewriter_test this week as openxla/xla#9666 is merged

Nope. Still fails.

@draganmladjenovic draganmladjenovic force-pushed the develop-upstream-sync-240521 branch 2 times, most recently from 4e1e7ee to f1d0cc8 Compare May 31, 2024 05:04
@i-chaochen
Copy link

i-chaochen commented May 31, 2024

@draganmladjenovic let's disable this one as well so this weekly-sync should be ok. We should enable some of disable XLA ones next weekly-sync.

@draganmladjenovic draganmladjenovic force-pushed the develop-upstream-sync-240521 branch 2 times, most recently from bae8034 to 161cea2 Compare June 2, 2024 13:31
@draganmladjenovic
Copy link
Author

retest Ubuntu-GPU-single please

@draganmladjenovic draganmladjenovic force-pushed the develop-upstream-sync-240521 branch from 161cea2 to 4e0d9b8 Compare June 2, 2024 19:23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ruturaj4 @rahulbatra85 please check this on JAX side.

@draganmladjenovic draganmladjenovic force-pushed the develop-upstream-sync-240521 branch from 4e0d9b8 to cc4a257 Compare June 3, 2024 17:46
@draganmladjenovic
Copy link
Author

retest Ubuntu-GPU-single please

1 similar comment
@draganmladjenovic
Copy link
Author

retest Ubuntu-GPU-single please

@draganmladjenovic
Copy link
Author

retest Ubuntu-CPU please

@i-chaochen
Copy link

retest Ubuntu-GPU-single please

@i-chaochen
Copy link

retest Ubuntu-GPU-single please
retest Ubuntu-CPU please

@draganmladjenovic
Copy link
Author

@i-chaochen Please review.

Copy link

@i-chaochen i-chaochen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@draganmladjenovic could you upstream this profile change? 4736848

@draganmladjenovic draganmladjenovic merged commit c3a1fef into develop-upstream Jun 5, 2024
9 checks passed
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.