Repository navigation
[pull] master from tensorflow:master - #8849
Merged
Merged
Conversation
Updated copyright year and refactored random functions to enforce seed dtype compatibility in tests.
Updated copyright year from 2024 to 2023 and modified the d_random module to include DTensor helpers for random generators. Added new implementations for stateless normal and uniform random functions with layout support.
NumPy raises AxisError when stack receives an out-of-bounds axis. The function forwarded the axis to the backend kernel unvalidated, producing a confusing runtime failure. Add static bounds validation for statically known ranks; axis == rank remains valid since it is an insertion position, matching NumPy 2.x behavior.
Raw Python list inputs do not have a .shape attribute, so wrap the first element with asarray before querying its rank. Also wrap the nonempty_nonscalar_array_shapes definition to satisfy the 80-character Pylint limit.
PiperOrigin-RevId: 986531378
…r-crash PiperOrigin-RevId: 986531571
PiperOrigin-RevId: 986536624
…sycl kernels Imported from GitHub PR openxla/xla#49301 LLVM might retain unused 0-sized kernel arguments and mark them as `readnone` instead of removing them. The runtime will not allocate any memory and return nullptr. Hence, a valid kernel can carry a null pointer argument. This PR relaxes the sycl kernel launch null argument check so that valid kernels with nullptr arguments are not rejected. This helps fix `xla/backends/gpu/codegen/emitters/tests/scatter/sorted_empty_indices.hlo` test with the oneAPI backend. This issue came to light after openxla/xla@f12e3c4 added a test with empty indices for a scatter operation. Copybara import of the project: -- db19166bd5dbbe92137acc7ecd33013fec588af0 by Akhil Goel <akhil.goel@intel.com>: Allow nullptr kernel args Merging this change closes #49301 PiperOrigin-RevId: 986541498
PiperOrigin-RevId: 986547234
Imported from GitHub PR openxla/xla#48307 This PR explicitly disables oneDNN custom calls for YNN-specific tests to avoid unit test failures when running with oneDNN (as `--xla_cpu_experimental_onednn_custom_call` is `false` by default). Copybara import of the project: -- 9df06a9bfb4082b5adb3e3623638ed9d5909fb92 by Om Thakkar <om.thakkar@intel.com>: explicitly disable oneDNN for YNN-specific tests Merging this change closes #48307 PiperOrigin-RevId: 986549795
Imported from GitHub PR openxla/xla#43318 📝 Summary of Changes Introduce AMX-FP8 CPU feature and use it to gate FP8 dispatch through oneDNN, with an AMX-FP16 emulation fallback for hosts without native AMX-FP8. - Add CPUFeature::AMX_FP8, map it to `diamondrapids`, and register it in CpuFeatureFromString. - Detect `+amx-fp8` / `+amx-fp16` from the LLVM feature string and expose has_amx_fp8()/has_amx_fp16() on TargetMachineFeatures. - When max_cpu_feature is capped at AMX_FP16, suppress DMR-and-newer additions (amx-fp8/-tf32/-avx512/-movrs, avx10.2, APX) so a GNR-tuned binary cannot emit post-GNR instructions. - Extend IsOneDnnSupportedDType to accept F8E5M2/F8E4M3FN/F8E4M3: dispatch natively on AMX-FP8, else fall back to AMX-FP16 emulation and LOG_FIRST_N the fallback. - Add a parameterized TargetMachineFeatures test covering SPR, GNR (emulation), and DMR (native) feature strings. 🎯 Justification We need to detect if x86 CPU supports FP8 because calling onednn for fp8 functionality 🚀 Kind of Contribution : ✨ New Feature, 📊 Benchmark (for Performance Improvements) This doesn't affect any performance yet. 🧪 Unit Tests: xla/service/cpu/tests/cpu_vectorization_test.cc 🧪 Execution Tests: Doesn't affect existing execution tests Copybara import of the project: -- 7d975a8af8825ac9afcde6e6b9b9a0788bb112ee by Gauri Deshpande <gauri1.deshpande@intel.com>: [oneDNN][CPU] Add initial FP8 support for oneDNN dispatch -- 9445a7dad3b751228a6a7f4f23383fee05eadec5 by Gauri Deshpande <gauri1.deshpande@intel.com>: Fix clang-tidy braces and missing absl/log include in FP8 oneDNN support -- b33af61a351de16f8706e6b0ed26a2bcc0a95f16 by gaurides <gauri1.deshpande@intel.com>: Address review comment - use AVX10.2 Co-authored-by: Penporn Koanantakool <38085909+penpornk@users.noreply.github.com> -- 60727426128036d9926dbca6a7efd29087ec5017 by Gauri Deshpande <gauri1.deshpande@intel.com>: fix rebase duplicate lines of codes Merging this change closes #43318 PiperOrigin-RevId: 986557057
…so LHS can treat it as async ops Imported from GitHub PR openxla/xla#48288 📝 Summary of Changes Add the "parallel" to the execution threads for any explicitly stream-annotated instructions. LHS checks for the execution threads to determine if a certain computation contains async ops for scheduling, without this, if a computation only contains stream-annotated instructions, LHS will skip scheduling it. 🎯 Justification functional correctness for stream-annotated instructions 🚀 Kind of Contribution Please remove what does not apply: 🐛 Bug Fix 🧪 Unit Tests: added unit test Copybara import of the project: -- eb5031dff696996235c405ec1ca7bc564d6198d0 by TJ Xu <tjx@nvidia.com>: add parallel threads to explicitly annotated instructions so LHS can treat it as async ops -- 60281ae08a36d6035b6b9d8758e9a1162926cb41 by TJ Xu <tjx@nvidia.com>: address pr comments -- 0a65afaf3b674990b29553a94fafb547b7d6f7fe by TJ Xu <tjx@nvidia.com>: fix test failure -- 0e182bdd1fdf9f7fcc5eeeef038c64dd7bfd9aa3 by TJ Xu <tjx@nvidia.com>: fix decomposer when called by autotuner Merging this change closes #48288 PiperOrigin-RevId: 986557067
…bounds PiperOrigin-RevId: 986563076
Goldens could only be written by hand. kUpdateGolden dumps them from a test run;
the script that drives it follows in the next change.
Two behaviour changes:
* A missing target directory is now NotFound rather than an empty test matrix.
A mistyped target name used to yield a suite that passed while testing
nothing.
* AOTTestPlatform is required on the test_lib entry points. The GPU default
let a CPU caller resolve GPU paths.
Dumping and verification must compile under identical debug options or the
golden is not comparable to what verification recompiles, so
`ApplyAotDeterminismDebugOptions` is the single definition and every
CompileOptions site routes through it.
PiperOrigin-RevId: 986588877
… = "gtest_main")` for Bazel `layering_check` compatibility, which disables BANT DWYU's empty-`hdrs` keep heuristic. Without `includes` or `keep_dep` on `gtest_main`, BANT DWYU fails to index `gtest_main`'s headers under `gtest/*.h` and `gmock/*.h` and suggests removing `@com_google_googletest//:gtest_main` from test targets. Add `includes` and `tags = ["avoid_dep", "keep_dep"]` to `gtest_main` in `googletest.patch` so `gtest_main` satisfies `gtest`/`gmock` header includes and is never removed by DWYU, while `avoid_dep` ensures `:gtest` is still preferred when suggesting missing dependencies (and omitting `alwayslink = True` avoids duplicate `main()` ODR violations in targets that also transitively depend on `//tensorflow/core:test_main`). PiperOrigin-RevId: 986597415
PiperOrigin-RevId: 986605327
…ner and cost model PiperOrigin-RevId: 986624882
PiperOrigin-RevId: 986632786
This changes tiling analysis and block level emitter. While we have tried to keep the implementation close to current triton block-level emitter there are some differences that migth result in: - different numeric results - different fusion decisions, due to cost model estimations - new bugs - increased compilation time - mostly due to priority fusion. We are working on optimizing it. PiperOrigin-RevId: 986646237
…hermetic_download Imported from GitHub PR openxla/xla#49152 📝 Summary of Changes Switch to newest rules_ml_toolchain, override hermetic rocm download in bzlmod 🎯 Justification In a past implementation we used hermetic_rocm_download from inside rules_ml_toolchain that leads to a usage of the older rocm distribution for the rocm_toolchain (hipcc). In this PR we override the extension hence using whatever is provided by the rocm_configure. 🚀 Kind of Contribution Please remove what does not apply: 🐛 Bug Fix, 📊 Benchmark (for Performance Improvements) Not relevant 🧪 Unit Tests: CI 🧪 Execution Tests: CI Copybara import of the project: -- 2e7c9dffb75b39a2b737a1d6707e3b30494db9bb by Alexandros Theodoridis <atheodor@amd.com>: Switch to newest rules_ml_toolchain, override rocm_hermetic_download -- 9a2fb9b8f25f523ac3c2884e625dc15e85fe4767 by Alexandros Theodoridis <atheodor@amd.com>: Override rocm_hermetic_download_ext -- e83ec060a34220c2424f090a8d74e1fee285fc75 by Alexandros Theodoridis <atheodor@amd.com>: Fix invalid hipcc usage Merging this change closes #49152 PiperOrigin-RevId: 986660810
… YNNPACK delegate's MoE op. PiperOrigin-RevId: 986670634
… on hlo evaluators. Also drop clearing the cache for computations and instructions on child evaluators. Using caching does not support for when the computations may be modified. PiperOrigin-RevId: 986671239
PiperOrigin-RevId: 986671871
Record runs after Prepare -> Initialize.
The following events can happen given 2 GPUs within the same process.
TS1. Thread0 (Host) queues a collective kernel on Gpu0. Asynchronously.
Gpu0 kernel (device) blocks on GPU1 to also execute the corresponding
collective on Gpu1.
TS2. Thread0 Records a kernal (with FFI). Calls cuModuleLoad and acquires driver
mutex. However loading cannot finish until Gpu0 (device) is free. So it
waits.
TS3. Thread1 which lags a bit behind Thread0 calls cuLaunchKernel but blocks
because the driver lock was taken during TS2. Collective kernel is never
launched and GPU0 (TS1) keeps waiting.
To prevent this deadlock we must allow FFI users to load kernels during
preparation. Since not all FFI users can use se::Kernel API for loading we can
allow using a function pointer that was loaded and cached by the FFI user
so cuModuleLoad is not called anymore during the record phase.
Note that this problem only exists for users running single process across multiple GPUs.
PiperOrigin-RevId: 986676717
When `RewriteHero` replaces downstream `dynamic-update-slice` or `get-tuple-element` instructions rather than the `hero` instruction directly, `HloComputation::ReplaceInstruction` invokes `RemoveInstructionAndUnusedOperands` on the downstream instruction. Because `RemoveInstructionAndUnusedOperands` skips upstream operands that have side effects (`item->HasSideEffect() && item != instruction`), a side-effecting hero (such as an FFI custom-call with `custom_call_has_side_effect=true`) and its sliced operand chain remain alive in the parent computation alongside the newly created `dynamic_slice_fusion`, causing the side-effecting custom-call to execute twice. Transfer control dependencies from `hero` to `fusion` and explicitly invoke `RemoveInstructionAndUnusedOperands(hero)` when `hero` has side effects and is not directly replaced. Also check user counts in `ResolveLeafDus` and `ResolveNonTupleSlicedResult` (and ensure tuple heroes only have unique GTE users in `HasSupportedShapes`) so DUS chains are only absorbed when the hero/GTE has a single user, preventing duplicate heroes when external users exist. PiperOrigin-RevId: 986687589
… XLA. The `xla::memory_space_assignment` pass implementation, options, simulator, cost analysis, and repacking algorithms are only used by internal backend compilation pipelines, whereas open-source `buffer_assignment.h` only references `xla::memory_space_assignment::PresetAssignments`. Remove the unused implementation files and unit tests from `xla/service/memory_space_assignment/`, retaining only `PresetAssignments` in `xla/service/memory_space_assignment/memory_space_assignment.h`. PiperOrigin-RevId: 986698639
PiperOrigin-RevId: 986702595
PiperOrigin-RevId: 986703064
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )