Skip to content

Comments

Force hipify to use copied version from rocm-6.3.0-14776 build#69

Merged
TedThemistokleous merged 3 commits intorocm6.3_internal_testingfrom
retarget_hipify_tool
Oct 10, 2024
Merged

Force hipify to use copied version from rocm-6.3.0-14776 build#69
TedThemistokleous merged 3 commits intorocm6.3_internal_testingfrom
retarget_hipify_tool

Conversation

@TedThemistokleous
Copy link
Collaborator

Description

Copied out hipifiy-perl from working docker container as mentioned by @xinyazhang
Retargeted amd_hipify to use the copied item found in onnxruntime root

Motivation and Context

Changed as an upstream change to the rocm stack requires a bunch of work required to get a working rebuild of ROCm EP.
Currently this inhibits development and blocks 6.3 wheel builds

Copy link
Collaborator

@causten causten left a comment

Choose a reason for hiding this comment

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

Does this need to be merged upstream? Would the path for hipify-perl be appropriate? Seems like you are suggesting it belongs in the root.

Copy link

@xinyazhang xinyazhang left a comment

Choose a reason for hiding this comment

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

hipify-perl should be placed under the same directory of amd_hipify.py rather than root of the source tree, unless there is really good reason.

@xinyazhang
Copy link

Does this need to be merged upstream? Would the path for hipify-perl be appropriate? Seems like you are suggesting it belongs in the root.

This is a temporary solution and we are working on another PR that eliminates -roc argument from

s = subprocess.run([hipify_perl_path, "-roc", src_file_path], stdout=subprocess.PIPE, text=True, check=False).stdout

, which should work for newer hipify-perl

@TedThemistokleous
Copy link
Collaborator Author

hipify-perl should be placed under the same directory of amd_hipify.py rather than root of the source tree, unless there is really good reason.

Done. Just retesting this. and will update once done.

@TedThemistokleous
Copy link
Collaborator Author

Does this need to be merged upstream? Would the path for hipify-perl be appropriate? Seems like you are suggesting it belongs in the root.

No it shouldn't for now. The plan is to revert this once the changes for hipify are done here for the ROCm EP

@TedThemistokleous
Copy link
Collaborator Author

Moved it and had to update permissions. Looks like its built and working minus some other test thats failed

image

Copy link

@xinyazhang xinyazhang left a comment

Choose a reason for hiding this comment

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

Do not use absolute path. Compute it in your amd_hipify.py

args = parser.parse_args()

hipify(args.hipify_perl, args.src, args.output)
hipify("/onnxruntime/tools/ci_build/hipify-perl", args.src, args.output)

Choose a reason for hiding this comment

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

Use

hipify(os.path.join(os.path.dirname(__file__), "hipify-perl"), args.src, args.output)

Instead

Copy link
Collaborator Author

@TedThemistokleous TedThemistokleous Oct 10, 2024

Choose a reason for hiding this comment

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

Done - retested this and works

@TedThemistokleous TedThemistokleous merged commit ad60c03 into rocm6.3_internal_testing Oct 10, 2024
@TedThemistokleous TedThemistokleous deleted the retarget_hipify_tool branch October 10, 2024 21:16
TedThemistokleous added a commit that referenced this pull request Jan 3, 2025
* Force hipify to use copied version from rocm-6.3.0-14776 build

* Update hipify-perl location and permissions

* Update hipify path to remove absolute path
streamhsa pushed a commit that referenced this pull request May 22, 2025
Required so we can convert kernels with the latest hipify that supports latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to #69
TedThemistokleous added a commit that referenced this pull request May 28, 2025
* Use the latest hipify-perl for ROCm 7.0 instead of pinned version

Required so we can convert kernels with the latest hipify that supports latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to #69

* Remove roctracer_hcc.h include

Not needed as roctracer_hip.h superceeds this

* Removal of hipblas_v2_api reference

Just make this use hipblas directly

* Use local system hipify

no os path join needed

* Add HIPIFY Path log mesasge for build
TedThemistokleous added a commit to TedThemistokleous/onnxruntime that referenced this pull request May 28, 2025
* Use the latest hipify-perl for ROCm 7.0 instead of pinned version

Required so we can convert kernels with the latest hipify that supports latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to ROCm#69

* Remove roctracer_hcc.h include

Not needed as roctracer_hip.h superceeds this

* Removal of hipblas_v2_api reference

Just make this use hipblas directly

* Use local system hipify

no os path join needed

* Add HIPIFY Path log mesasge for build
tianleiwu pushed a commit to microsoft/onnxruntime that referenced this pull request Jun 5, 2025
* Use the latest hipify-perl for ROCm 7.0 instead of pinned version

Required so we can convert kernels with the latest hipify that supports
latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to ROCm#69

* Remove roctracer_hcc.h include

Not needed as roctracer_hip.h superceeds this

* Removal of hipblas_v2_api reference

Just make this use hipblas directly

* Use local system hipify

no os path join needed

* Add HIPIFY Path log mesasge for build

### Description
<!-- Describe your changes. -->
Update to use the local version of hipify from the ROCm release.
Relevant since we'd like to ensure the latest hipify changes are being
used and being tested when using ROCm EP


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Latest and greatest for ROCm EP to convert kernels via hipify-perl
mechanism

Co-authored-by: Ted Themistokleous <[email protected]>
javier-intel pushed a commit to intel/onnxruntime that referenced this pull request Jun 15, 2025
…4885)

* Use the latest hipify-perl for ROCm 7.0 instead of pinned version

Required so we can convert kernels with the latest hipify that supports
latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to ROCm#69

* Remove roctracer_hcc.h include

Not needed as roctracer_hip.h superceeds this

* Removal of hipblas_v2_api reference

Just make this use hipblas directly

* Use local system hipify

no os path join needed

* Add HIPIFY Path log mesasge for build

### Description
<!-- Describe your changes. -->
Update to use the local version of hipify from the ROCm release.
Relevant since we'd like to ensure the latest hipify changes are being
used and being tested when using ROCm EP


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Latest and greatest for ROCm EP to convert kernels via hipify-perl
mechanism

Co-authored-by: Ted Themistokleous <[email protected]>
quic-ankus pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Nov 25, 2025
…crosoft#24885)

* Use the latest hipify-perl for ROCm 7.0 instead of pinned version

Required so we can convert kernels with the latest hipify that supports
latest hipblas change

- Remove hipify-perl version from rocm-6.3.0-14776 build
- Use the argument pushed to the amd_hipify.py script.

related to ROCm#69

* Remove roctracer_hcc.h include

Not needed as roctracer_hip.h superceeds this

* Removal of hipblas_v2_api reference

Just make this use hipblas directly

* Use local system hipify

no os path join needed

* Add HIPIFY Path log mesasge for build

### Description
<!-- Describe your changes. -->
Update to use the local version of hipify from the ROCm release.
Relevant since we'd like to ensure the latest hipify changes are being
used and being tested when using ROCm EP


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Latest and greatest for ROCm EP to convert kernels via hipify-perl
mechanism

Co-authored-by: Ted Themistokleous <[email protected]>
apwojcik pushed a commit that referenced this pull request Jan 26, 2026
Some PRs that use core/common/inlined_containers.h can cause failures in
the CUDA CI pipeline.

```
E:\_work\_temp\build\RelWithDebInfo\vcpkg_installed\x64-windows-static-md\include\absl/hash/internal/hash.h(481): error #68-D: integer conversion resulted in a change of sign [E:\_work\_temp\build\RelWithDebInfo\onnxruntime_providers_cuda.vcxproj]
          sizeof(T) == -1,
                       ^
  Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

E:\_work\_temp\build\RelWithDebInfo\vcpkg_installed\x64-windows-static-md\include\absl/hash/hash.h(337): error microsoft#549-D: variable "s" is used before its value is set [E:\_work\_temp\build\RelWithDebInfo\onnxruntime_providers_cuda.vcxproj]
        return s;
               ^
E:\_work\_temp\build\RelWithDebInfo\vcpkg_installed\x64-windows-static-md\include\absl/container/internal/raw_hash_set.h(468): error #69-D: integer conversion resulted in truncation [E:\_work\_temp\build\RelWithDebInfo\onnxruntime_providers_cuda.vcxproj]
          static_cast<uint16_t>(reinterpret_cast<uintptr_t>(&seed));
                      ^
  3 errors detected in the compilation of "E:/_work/onnxruntime/onnxruntime/onnxruntime/contrib_ops/cuda/sparse/block_mask.cu".
```

This change adds a patch to Abseil to mitigate those failures.


This solution has been verified to be effective in PR
microsoft#27087.
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.

3 participants