-
Notifications
You must be signed in to change notification settings - Fork 239
Media Libraries - rocDecode & rocJPEG tests #3098
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 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
1b97ff1
Media Libraries - rocDecode & rocJPEG integration (#1)
kiritigowda 11eebe9
Review - Fixes
kiritigowda b7bc6b6
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 77e3a5a
Fix - pre-commit
kiritigowda 5a93910
Fix - Fetch source updates
kiritigowda e4fe5c4
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 4cd6c52
Media - Submodules and reviewer comments fix
kiritigowda 29a34d5
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda d2f3c1c
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 16e7031
Packaging - Cleanup deps
kiritigowda d5fe48f
Tests - Timeout time enhancement
kiritigowda 632a343
CMakeLists - Media lib location fix
kiritigowda bc34d1e
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 09af194
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 40ff6c9
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda b3914b5
CMakelists - Resolve conflicts
kiritigowda 46a771d
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda c832d93
Claude.md - updates
kiritigowda 3506c93
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 88b3e94
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda d9494ce
Test - Add info tests
kiritigowda ac3ebb0
Test - refactor
kiritigowda 7aef436
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 650e897
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 342db06
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 82a4c33
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 8d49687
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 9d15e4a
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 9dcd1b4
Update install_rocm_from_artifacts.py
kiritigowda 8733de0
Update BUILD_TOPOLOGY.toml
kiritigowda 99b11be
Update fetch_test_configurations.py - Add tests
kiritigowda d107593
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 42a2f97
Packaging - use pr#3579
kiritigowda fff2a18
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 3a2578a
CLAUDE.md - reset
kiritigowda 137b299
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 75e12da
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 6015421
Test - enhancements
kiritigowda ed7f639
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 9c46d7a
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda c47d517
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda d5901eb
Merge branch 'main' into kg/media-libs-for-therock
kiritigowda 67db21c
Merge branch 'main' into kg/media-libs-for-therock
AryanSalmanpour 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
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
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
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
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
80 changes: 80 additions & 0 deletions
80
build_tools/github_actions/test_executable_scripts/test_rocdecode.py
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,80 @@ | ||
| import logging | ||
| import os | ||
| import shlex | ||
| import subprocess | ||
| from pathlib import Path | ||
| import sys | ||
| import platform | ||
|
|
||
| logging.basicConfig(level=logging.INFO) | ||
| THEROCK_BIN_DIR_STR = os.getenv("THEROCK_BIN_DIR") | ||
| if THEROCK_BIN_DIR_STR is None: | ||
| logging.info( | ||
| "++ Error: env(THEROCK_BIN_DIR) is not set. Please set it before executing tests." | ||
| ) | ||
| sys.exit(1) | ||
| THEROCK_BIN_DIR = Path(THEROCK_BIN_DIR_STR) | ||
| SCRIPT_DIR = Path(__file__).resolve().parent | ||
| THEROCK_DIR = SCRIPT_DIR.parent.parent.parent | ||
| THEROCK_TEST_DIR = Path(THEROCK_DIR) / "build" | ||
|
|
||
| ROCDECODE_TEST_PATH = str( | ||
| Path(THEROCK_BIN_DIR).resolve().parent / "share" / "rocdecode" / "test" | ||
| ) | ||
| if not os.path.isdir(ROCDECODE_TEST_PATH): | ||
| logging.info(f"++ Error: rocdecode tests not found in {ROCDECODE_TEST_PATH}") | ||
| sys.exit(1) | ||
| else: | ||
| logging.info(f"++ INFO: rocdecode tests found in {ROCDECODE_TEST_PATH}") | ||
| env = os.environ.copy() | ||
|
|
||
|
|
||
| # set env variables required for tests | ||
| def setup_env(env): | ||
| ROCM_PATH = Path(THEROCK_BIN_DIR).resolve().parent | ||
| env["ROCM_PATH"] = str(ROCM_PATH) | ||
| logging.info(f"++ rocdecode setting ROCM_PATH={ROCM_PATH}") | ||
| if platform.system() == "Linux": | ||
| HIP_LIB_PATH = Path(THEROCK_BIN_DIR).resolve().parent / "lib" | ||
| logging.info(f"++ rocdecode setting LD_LIBRARY_PATH={HIP_LIB_PATH}") | ||
| if "LD_LIBRARY_PATH" in env: | ||
| env["LD_LIBRARY_PATH"] = f"{HIP_LIB_PATH}:{env['LD_LIBRARY_PATH']}" | ||
| else: | ||
| env["LD_LIBRARY_PATH"] = str(HIP_LIB_PATH) | ||
| else: | ||
| logging.info(f"++ rocdecode tests only supported on Linux") | ||
| exit() | ||
|
|
||
|
|
||
| def execute_tests(env): | ||
| ROCDECODE_TEST_DIR = Path(THEROCK_TEST_DIR) / "rocdecode-test" | ||
|
|
||
| cmd = [ | ||
| "mkdir", | ||
| "-p", | ||
| "rocdecode-test", | ||
| ] | ||
| logging.info(f"++ Exec [{THEROCK_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=THEROCK_TEST_DIR, check=True, env=env) | ||
|
|
||
| cmd = [ | ||
| "cmake", | ||
| "-GNinja", | ||
| ROCDECODE_TEST_PATH, | ||
| ] | ||
|
|
||
| logging.info(f"++ Exec [{ROCDECODE_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=ROCDECODE_TEST_DIR, check=True, env=env) | ||
|
|
||
| cmd = [ | ||
| "ctest", | ||
| "-VV", | ||
| "--output-on-failure", | ||
| ] | ||
| logging.info(f"++ Exec [{ROCDECODE_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=ROCDECODE_TEST_DIR, check=True, env=env) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| setup_env(env) | ||
| execute_tests(env) |
78 changes: 78 additions & 0 deletions
78
build_tools/github_actions/test_executable_scripts/test_rocjpeg.py
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,78 @@ | ||
| import logging | ||
| import os | ||
| import shlex | ||
| import subprocess | ||
| from pathlib import Path | ||
| import sys | ||
| import platform | ||
|
|
||
| logging.basicConfig(level=logging.INFO) | ||
| THEROCK_BIN_DIR_STR = os.getenv("THEROCK_BIN_DIR") | ||
| if THEROCK_BIN_DIR_STR is None: | ||
| logging.info( | ||
| "++ Error: env(THEROCK_BIN_DIR) is not set. Please set it before executing tests." | ||
| ) | ||
| sys.exit(1) | ||
| THEROCK_BIN_DIR = Path(THEROCK_BIN_DIR_STR) | ||
| SCRIPT_DIR = Path(__file__).resolve().parent | ||
| THEROCK_DIR = SCRIPT_DIR.parent.parent.parent | ||
| THEROCK_TEST_DIR = Path(THEROCK_DIR) / "build" | ||
|
|
||
| ROCJPEG_TEST_PATH = str( | ||
| Path(THEROCK_BIN_DIR).resolve().parent / "share" / "rocjpeg" / "test" | ||
| ) | ||
| if not os.path.isdir(ROCJPEG_TEST_PATH): | ||
| logging.info(f"++ Error: rocjpeg tests not found in {ROCJPEG_TEST_PATH}") | ||
| sys.exit(1) | ||
| else: | ||
| logging.info(f"++ INFO: rocjpeg tests found in {ROCJPEG_TEST_PATH}") | ||
| env = os.environ.copy() | ||
|
|
||
|
|
||
| # set env variables required for tests | ||
| def setup_env(env): | ||
| ROCM_PATH = Path(THEROCK_BIN_DIR).resolve().parent | ||
| env["ROCM_PATH"] = str(ROCM_PATH) | ||
| logging.info(f"++ rocjpeg setting ROCM_PATH={ROCM_PATH}") | ||
| if platform.system() == "Linux": | ||
| HIP_LIB_PATH = Path(THEROCK_BIN_DIR).resolve().parent / "lib" | ||
| logging.info(f"++ rocjpeg setting LD_LIBRARY_PATH={HIP_LIB_PATH}") | ||
| if "LD_LIBRARY_PATH" in env: | ||
| env["LD_LIBRARY_PATH"] = f"{HIP_LIB_PATH}:{env['LD_LIBRARY_PATH']}" | ||
| else: | ||
| env["LD_LIBRARY_PATH"] = str(HIP_LIB_PATH) | ||
| else: | ||
| logging.info(f"++ rocjpeg tests only supported on Linux") | ||
| exit() | ||
|
|
||
|
|
||
| def execute_tests(env): | ||
| ROCJPEG_TEST_DIR = Path(THEROCK_TEST_DIR) / "rocjpeg-test" | ||
| cmd = [ | ||
| "mkdir", | ||
| "-p", | ||
| "rocjpeg-test", | ||
| ] | ||
| logging.info(f"++ Exec [{THEROCK_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=THEROCK_TEST_DIR, check=True, env=env) | ||
|
|
||
| cmd = [ | ||
| "cmake", | ||
| "-GNinja", | ||
| ROCJPEG_TEST_PATH, | ||
| ] | ||
| logging.info(f"++ Exec [{ROCJPEG_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=ROCJPEG_TEST_DIR, check=True, env=env) | ||
|
|
||
| cmd = [ | ||
| "ctest", | ||
| "-VV", | ||
| "--output-on-failure", | ||
| ] | ||
| logging.info(f"++ Exec [{ROCJPEG_TEST_DIR}]$ {shlex.join(cmd)}") | ||
| subprocess.run(cmd, cwd=ROCJPEG_TEST_DIR, check=True, env=env) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| setup_env(env) | ||
| execute_tests(env) |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.