ai-edge-torch-nightly 0.2.0.dev20240725__py3-none-any.whl → 0.2.0.dev20240727__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ai-edge-torch-nightly might be problematic. Click here for more details.

@@ -354,7 +354,7 @@ def _search_model(
354
354
  max_granularity: Optional[int] = None,
355
355
  enable_fx_minifier_logging: bool = False,
356
356
  ) -> Generator[SearchResult, None, None]:
357
- """Finds subgraphs in the torch model that satify a certain predicate function provided by the users.
357
+ """Finds subgraphs in the torch model that satisfy a certain predicate function provided by the users.
358
358
 
359
359
  Args:
360
360
  predicate_f: a predicate function the users specify.
@@ -382,26 +382,33 @@ def _search_model(
382
382
  fx_gm, fx_inputs = utils.exported_program_to_fx_graph_module_and_inputs(ep)
383
383
  fx_gm = _normalize_getitem_nodes(fx_gm)
384
384
 
385
- # HACK: temporarily disable XLA_HLO_DEBUG so that fx_minifier won't dump
386
- # intermediate stablehlo files to storage.
385
+ # HACK: temporarily disable XLA_HLO_DEBUG and create_minified_hlo_graph so that
386
+ # fx_minifier won't dump intermediate stablehlo files to storage.
387
387
  # https://github.com/pytorch/pytorch/blob/main/torch/_functorch/fx_minifier.py#L440
388
388
  @contextlib.contextmanager
389
- def disable_xla_hlo_debug():
389
+ def disable_minifier_xla_debug():
390
390
  xla_hlo_debug_value = None
391
391
  if "XLA_HLO_DEBUG" in os.environ:
392
392
  xla_hlo_debug_value = os.environ["XLA_HLO_DEBUG"]
393
393
  del os.environ["XLA_HLO_DEBUG"]
394
394
 
395
+ create_minified_hlo_graph = torch._functorch.fx_minifier.create_minified_hlo_graph
396
+ torch._functorch.fx_minifier.create_minified_hlo_graph = (
397
+ lambda *args, **kwargs: None
398
+ )
399
+
395
400
  try:
396
- yield None
401
+ yield
397
402
  finally:
398
403
  if xla_hlo_debug_value is not None:
399
404
  os.environ["XLA_HLO_DEBUG"] = xla_hlo_debug_value
400
405
 
406
+ torch._functorch.fx_minifier.create_minified_hlo_graph = create_minified_hlo_graph
407
+
401
408
  found_culprits_num = 0
402
409
  while True:
403
410
  try:
404
- with disable_xla_hlo_debug(), open(os.devnull, "w") as devnull:
411
+ with disable_minifier_xla_debug(), open(os.devnull, "w") as devnull:
405
412
  with contextlib.nullcontext() if enable_fx_minifier_logging else utils.redirect_stdio(
406
413
  stdout=devnull,
407
414
  stderr=devnull,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-edge-torch-nightly
3
- Version: 0.2.0.dev20240725
3
+ Version: 0.2.0.dev20240727
4
4
  Summary: Supporting PyTorch models with the Google AI Edge TFLite runtime.
5
5
  Home-page: https://github.com/google-ai-edge/ai-edge-torch
6
6
  Keywords: On-Device ML,AI,Google,TFLite,PyTorch,LLMs,GenAI
@@ -27,7 +27,10 @@ Requires-Dist: numpy
27
27
  Requires-Dist: scipy
28
28
  Requires-Dist: safetensors
29
29
  Requires-Dist: tabulate
30
- Requires-Dist: torch >2.3
30
+ Requires-Dist: torch >=2.4.0
31
+ Requires-Dist: torch-xla >=2.4.0
32
+ Requires-Dist: tf-nightly >=2.18.0.dev20240722
33
+ Requires-Dist: ai-edge-quantizer-nightly ==0.0.1.dev20240718
31
34
 
32
35
  Library that supports converting PyTorch models into a .tflite format, which can
33
36
  then be run with TensorFlow Lite and MediaPipe. This enables applications for
@@ -27,7 +27,7 @@ ai_edge_torch/convert/test/test_convert_composites.py,sha256=8UkdPtGkjgSVLCzB_rp
27
27
  ai_edge_torch/convert/test/test_convert_multisig.py,sha256=kMaGnHe9ylfyU68qCifYcaGwJqyejKz--QQt9jS2oUA,4537
28
28
  ai_edge_torch/convert/test/test_to_channel_last_io.py,sha256=I8c4ZG3v1vo0yxQYzLK_BTId4AOL9vadHGDtfCUZ4UI,2930
29
29
  ai_edge_torch/debug/__init__.py,sha256=N05Mmvi41KgSuK0JhuMejERESgP8QekiGdp9_PEyuKU,742
30
- ai_edge_torch/debug/culprit.py,sha256=urtCKPXORPvn6oyDxDSCSjgvngUnjjcsUMwAOeIl15E,14236
30
+ ai_edge_torch/debug/culprit.py,sha256=lN2N_J3EJTPcEH42xK6kvs4yOqZtyvvecSc4aidlog4,14556
31
31
  ai_edge_torch/debug/utils.py,sha256=hjVmQVVl1dKxEF0D6KB4a3ouQ3wBkTsebOX2YsUObZM,1430
32
32
  ai_edge_torch/debug/test/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
33
33
  ai_edge_torch/debug/test/test_culprit.py,sha256=9An_n9p_RWTAYdHYTCO-__EJlbnjclCDo8tDhOzMlwk,3731
@@ -125,8 +125,8 @@ ai_edge_torch/quantize/quant_config.py,sha256=eO9Ra160ITjQSyRBEGy6nNIVH3gYacSWDd
125
125
  ai_edge_torch/testing/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
126
126
  ai_edge_torch/testing/model_coverage/__init__.py,sha256=5P8J6Zk5YYtDvTBucFvB9NGSRI7Gw_24WnrbhXgycEE,765
127
127
  ai_edge_torch/testing/model_coverage/model_coverage.py,sha256=kzIulTldq8R9E-lAZsvfSTvLu3FYEX7b9DyYM3qisXM,4485
128
- ai_edge_torch_nightly-0.2.0.dev20240725.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
129
- ai_edge_torch_nightly-0.2.0.dev20240725.dist-info/METADATA,sha256=fwnI0u8Q4MJNeahUsCYe34o4YaeoRBJrUieJUk5ogY8,1745
130
- ai_edge_torch_nightly-0.2.0.dev20240725.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
131
- ai_edge_torch_nightly-0.2.0.dev20240725.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
132
- ai_edge_torch_nightly-0.2.0.dev20240725.dist-info/RECORD,,
128
+ ai_edge_torch_nightly-0.2.0.dev20240727.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
129
+ ai_edge_torch_nightly-0.2.0.dev20240727.dist-info/METADATA,sha256=Uj2LqEjkDs63Y-ZnV8afvs3GfZg84hzmoC6vomWi1ho,1889
130
+ ai_edge_torch_nightly-0.2.0.dev20240727.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
131
+ ai_edge_torch_nightly-0.2.0.dev20240727.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
132
+ ai_edge_torch_nightly-0.2.0.dev20240727.dist-info/RECORD,,