-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Simulated OpenVINO Backend for Testing Unmerged PR Features with Memory Profiling #21500
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
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8093d51
[OpenVINO backend] support slice_update
Mohamed-Ashraf273 1f8f2ea
add more detailed comments
Mohamed-Ashraf273 6e0aecd
[OpenVINO backend] handle scalar updates for slice_update
Mohamed-Ashraf273 6dd09ef
[OpenVINO backend] fix __getitem__ and convert_to_tensor issues
Mohamed-Ashraf273 c989c12
fix ov_type=none
Mohamed-Ashraf273 6b6de70
fix consistancy
Mohamed-Ashraf273 8832fb6
Merge branch 'support_slice_update' into gsoc2025
Mohamed-Ashraf273 d475d03
Merge branch 'convert_tf_tensor' into gsoc2025
Mohamed-Ashraf273 333b0c1
adding testing_files
Mohamed-Ashraf273 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,17 +171,14 @@ CoreOpsCallsTests::test_map_basic_call | |
CoreOpsCallsTests::test_scan_basic_call | ||
CoreOpsCallsTests::test_scatter_basic_call | ||
CoreOpsCallsTests::test_scatter_update_basic_call | ||
CoreOpsCallsTests::test_slice_update_basic_call | ||
CoreOpsCallsTests::test_switch_basic_call | ||
CoreOpsCallsTests::test_unstack_basic_functionality | ||
CoreOpsCorrectnessTest::test_associative_scan | ||
CoreOpsCorrectnessTest::test_cond | ||
CoreOpsCorrectnessTest::test_dynamic_slice | ||
CoreOpsCorrectnessTest::test_fori_loop | ||
CoreOpsCorrectnessTest::test_map | ||
CoreOpsCorrectnessTest::test_scan | ||
CoreOpsCorrectnessTest::test_scatter | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
CoreOpsCorrectnessTest::test_slice_update | ||
CoreOpsCorrectnessTest::test_switch | ||
CoreOpsCorrectnessTest::test_unstack | ||
CoreOpsCorrectnessTest::test_vectorized_map | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
============================= test session starts ============================== | ||
platform linux -- Python 3.12.3, pytest-8.4.0, pluggy-1.6.0 -- /home/mohamed-ashraf/Desktop/GSoC2025/env/bin/python | ||
cachedir: .pytest_cache | ||
rootdir: /home/mohamed-ashraf/Desktop/GSoC2025/keras-hub | ||
configfile: pytest.ini | ||
plugins: cov-6.1.1 | ||
collecting ... collected 15 items | ||
|
||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::TestCase::test_session SKIPPED [ 6%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_all_presets SKIPPED [ 13%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_cache_correctness PASSED [ 20%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_causal_lm_basics SKIPPED [ 26%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_early_stopping PASSED [ 33%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_flash_attention_call SKIPPED [ 40%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_generate PASSED [ 46%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_generate_compilation PASSED [ 53%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_generate_with_bfloat16 PASSED [ 60%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_multitoken_stopping PASSED [ 66%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_saved_model SKIPPED [ 73%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_score_layer_intercept_fn_exfiltration PASSED [ 80%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_score_logits PASSED [ 86%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_score_loss SKIPPED [ 93%] | ||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_session PASSED [100%] | ||
|
||
=============================== warnings summary =============================== | ||
../../../../../usr/lib/python3.12/multiprocessing/popen_fork.py:66 | ||
../../../../../usr/lib/python3.12/multiprocessing/popen_fork.py:66 | ||
/usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=8846) is multi-threaded, use of fork() may lead to deadlocks in the child. | ||
self.pid = os.fork() | ||
|
||
../openvino/build_python3.12/site-packages/python/openvino/runtime/__init__.py:10 | ||
/home/mohamed-ashraf/Desktop/GSoC2025/openvino/build_python3.12/site-packages/python/openvino/runtime/__init__.py:10: DeprecationWarning: The `openvino.runtime` module is deprecated and will be removed in the 2026.0 release. Please replace `openvino.runtime` with `openvino`. | ||
warnings.warn( | ||
|
||
../env/lib/python3.12/site-packages/_pytest/config/__init__.py:1474 | ||
/home/mohamed-ashraf/Desktop/GSoC2025/env/lib/python3.12/site-packages/_pytest/config/__init__.py:1474: PytestConfigWarning: Unknown config option: env | ||
|
||
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") | ||
|
||
keras_hub/src/models/gemma/gemma_causal_lm_test.py::GemmaCausalLMTest::test_session | ||
/usr/lib/python3.12/unittest/case.py:690: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TensorFlowTestCase.test_session of <keras_hub.src.models.gemma.gemma_causal_lm_test.GemmaCausalLMTest testMethod=test_session>>) | ||
return self.run(*args, **kwds) | ||
|
||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html | ||
================== 9 passed, 6 skipped, 5 warnings in 18.03s =================== |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
============================= test session starts ============================== | ||
platform linux -- Python 3.12.3, pytest-8.4.0, pluggy-1.6.0 -- /home/mohamed-ashraf/Desktop/GSoC2025/env/bin/python | ||
cachedir: .pytest_cache | ||
rootdir: /home/mohamed-ashraf/Desktop/GSoC2025/keras-hub | ||
configfile: pytest.ini | ||
plugins: cov-6.1.1 | ||
collecting ... collected 11 items | ||
|
||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::TestCase::test_session SKIPPED [ 9%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_all_presets SKIPPED [ 18%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_causal_lm_basics SKIPPED [ 27%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_early_stopping PASSED [ 36%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_generate PASSED [ 45%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_generate_compilation PASSED [ 54%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_saved_model SKIPPED [ 63%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_score_layer_intercept_fn_exfiltration PASSED [ 72%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_score_logits PASSED [ 81%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_score_loss SKIPPED [ 90%] | ||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_session PASSED [100%] | ||
|
||
=============================== warnings summary =============================== | ||
../../../../../usr/lib/python3.12/multiprocessing/popen_fork.py:66 | ||
../../../../../usr/lib/python3.12/multiprocessing/popen_fork.py:66 | ||
/usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=10106) is multi-threaded, use of fork() may lead to deadlocks in the child. | ||
self.pid = os.fork() | ||
|
||
../openvino/build_python3.12/site-packages/python/openvino/runtime/__init__.py:10 | ||
/home/mohamed-ashraf/Desktop/GSoC2025/openvino/build_python3.12/site-packages/python/openvino/runtime/__init__.py:10: DeprecationWarning: The `openvino.runtime` module is deprecated and will be removed in the 2026.0 release. Please replace `openvino.runtime` with `openvino`. | ||
warnings.warn( | ||
|
||
../env/lib/python3.12/site-packages/_pytest/config/__init__.py:1474 | ||
/home/mohamed-ashraf/Desktop/GSoC2025/env/lib/python3.12/site-packages/_pytest/config/__init__.py:1474: PytestConfigWarning: Unknown config option: env | ||
|
||
self._warn_or_fail_if_strict(f"Unknown config option: {key}\n") | ||
|
||
keras_hub/src/models/gpt2/gpt2_causal_lm_test.py::GPT2CausalLMTest::test_session | ||
/usr/lib/python3.12/unittest/case.py:690: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TensorFlowTestCase.test_session of <keras_hub.src.models.gpt2.gpt2_causal_lm_test.GPT2CausalLMTest testMethod=test_session>>) | ||
return self.run(*args, **kwds) | ||
|
||
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html | ||
================== 6 passed, 5 skipped, 5 warnings in 13.25s =================== |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
slice_update
function is lengthy and complex. Refactoring it into smaller, more focused helper functions could improve readability and maintainability. Consider helpers for processingstart_indices
, generating the multi-dimensional indices matrix, and calculating absolute indices.