Replies: 4 comments 8 replies
-
Do you mean you want to do something like this in non-kernel function? void foo(...) {
static local float lcl_mem[123]; // Note: invalid OpenCL C.
...
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes, I would like to use local memory inside device function but the issue is that I can't allocate it inside device function. Was wondering what would be the best way to approach this
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Henry Linjamäki ***@***.***>
Sent: Friday, August 2, 2024 2:46:50 PM
To: CHIP-SPV/chipStar ***@***.***>
Cc: Paulius Velesko ***@***.***>; Author ***@***.***>
Subject: Re: [CHIP-SPV/chipStar] Using __local memory inside devicelib (Discussion #902)
Do you mean you want to do something like this in non-kernel function?
void foo(...) {
static local float lcl_mem[123]; // Note: invalid OpenCL C.
...
}
—
Reply to this email directly, view it on GitHub<#902 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACCJBQM6DUTCS3PNZVXUTILZPNWSVAVCNFSM6AAAAABL4HROACVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRSGI4TMNY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
From @pjaaskel : | Can't you just move that local array inside the synchtreads_count() implementation? No, because you can only allocate memory in kernel regions - so this memory needs to be allocated somewhere else and passed in as argument |
Beta Was this translation helpful? Give feedback.
7 replies
-
Yeah pekka messaged me yesterday and i got it cleared up.
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Henry Linjamäki ***@***.***>
Sent: Thursday, August 8, 2024 9:20:56 AM
To: CHIP-SPV/chipStar ***@***.***>
Cc: Paulius Velesko ***@***.***>; Author ***@***.***>
Subject: Re: [CHIP-SPV/chipStar] Using __local memory inside devicelib (Discussion #902)
| I don't understand why there is no indication of size being generated by SPIR-V.
There should be like in this example<https://godbolt.org/z/x89dMqEn9> where the size of the var is encoded in %_arr_uint_ulong_10 = OpTypeArray ....
—
Reply to this email directly, view it on GitHub<#902 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACCJBQJDZZYDE7NSXDXXYQDZQME4RAVCNFSM6AAAAABL4HROACVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRXGE3DAMY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any suggestions on how to best allocate and pass __local memory to functions inside devicelib kernels?
Normally, this memory would be allocated inside kernel.
@linehill @pjaaskel
Beta Was this translation helpful? Give feedback.
All reactions