[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Porting ROCm to non-x86



Am I understanding correctly that "image support" refers to graphics? I see that section 3.3 of the HSA Runtime Programmer’s Reference Specification [1] is "Images and samplers" so I suppose that's what this flag controls?

Does the presence of this functionality affect what features are provided by dependent libraries, like hipamd?

[1]: https://hsafoundation.com/wp-content/uploads/2021/02/HSA-Runtime-1.2.pdf



On April 10, 2022 9:04:58 a.m. MDT, Jeremy Newton <alexjnewt@fastmail.com> wrote:
I looked at the build report, and just an FYI, the device libs and clang are only a build requirement if image support is enabled, so you can add [amd64] to the dependency, if you wish.

On April 8, 2022 10:41:32 p.m. EDT, "M. Zhou" <lumin@debian.org> wrote:
FYI: https://buildd.debian.org/status/package.php?p=rocr%2druntime

Already disabled IMAGE_SUPPORT for non-x86. Build result looks good.

On Fri, 2022-04-08 at 19:55 -0400, Jeremy Newton wrote:
amd64, arm64 and ppc64el

That's good to hear, because that's what I've been targeting in Fedora.

My patches around arch compilation issues have been accepted and should be merged into the develop branch of ROCclr on
github in the next cycle.

If you disable image support for non-x86 in rocr-runtime, you should be getting more arches compiling in 5.2 or 5.3,
depend on the validation cycle timing.

I'll keep the patches coming as I find issues.

On April 8, 2022 9:40:56 a.m. EDT, "M. Zhou" <lumin@debian.org> wrote:
Hi Jeremy,

Generally I don't think there are any 32-bit scientific computing users around.
My support for ROCm's i386 build is passive (depends on whether the upstream
wants to support it). Whether it builds or not does not affect the build scripts
I wrote.

For machine learning the three important architectures to support are
amd64, arm64 and ppc64el

On Fri, 2022-04-08 at 07:25 -0400, Jeremy Newton wrote:
If you're curious, here's my current patches that I'm testing:

https://copr-dist-git.fedorainfracloud.org/cgit/mystro256/rocm-opencl/rocm-opencl.git/tree/

Only one is upstream so far (fixes arm64 compile):
https://github.com/ROCm-Developer-Tools/ROCclr/commit/211c1c4d8c7f6dac48ba6c73256da60955f9dbd1

Out of curiosity, is there desire for 32bit support? I didn't bother trying as Fedora is de-proritising the arch, and
I assumed that it's not useful for compute. Right now rocr-runtime does not compile on i386.

On April 7, 2022 10:50:25 p.m. EDT, "M. Zhou" <lumin@debian.org> wrote:
On Thu, 2022-04-07 at 16:22 -0400, Jeremy Newton wrote:
Hi,

For rocr-runtime you need to add the following cmake option:

-DIMAGE_SUPPORT=OFF

For non-x86 platforms. This is because image support is not supported on non-x86 platforms.
If you think it would be best to autodetect this option in cmake, please let me know and I can try to make a patch.



Awesome. Adding this for non-x86 arhictctures is handy in debian packaging.
Let me add it soon and upload the package.

For rocm opencl and hip, they will also fail, but I have a patch for arm64 in the eventual 5.2 release, and I have a
patch for ppc64le in review (hopefully in time for 5.2).



I see. Looking forward to that!

Thanks

On Thu, Apr 7, 2022, at 9:00 AM, M. Zhou wrote:
Hi Jeremy,

Thanks for this. Speaking of the currently uploaded ROCm packages, like roct-thunk-interface
https://buildd.debian.org/status/package.php?p=roct%2dthunk%2dinterface ,
there is actually no restriction on which architectures the source should be built.

Namely, as long as a source is built successfully, it will be included in archive automatically.
So patches porting to any architecture will also be automatically used in Debian.

Currently the first break point on the dependency tree is rocr-runtime,
https://buildd.debian.org/status/package.php?p=rocr-runtime
which only build on amd64.

On Wed, 2022-04-06 at 13:19 -0400, Jeremy Newton wrote:
If there's interest, I've been working on packaging non-x86 ROCm packages for Fedora in my free time (ARM and


PPC64LE
currently). I'm not looking to do actual HW functional testing, but rather just fixing compilation and doing quick
skims of the code base to fix arch detection for arch-specific code or inline asm.
 
Feel free to reach out to me if you are interested in the existing patch series to include in Debian. I'm trying


to
get as much as possible in the upstream ROCm code as I have time. E.g. I landed this a month ago:
 
 https://github.com/ROCm-Developer-Tools/ROCclr/commit/211c1c4d8c7f6dac48ba6c73256da60955f9dbd1
 
And I have a follow up patch, waiting for internal review, that fixes/cleans up ARM and allows PCC64LE


compilation.












Reply to: