2 Commits

Author SHA1 Message Date
Slava Zakharin
e89129ed30
[flang][runtime] Added missing RT_API_ATTRS. (#101536) 2024-08-01 13:16:34 -07:00
Slava Zakharin
2177a1767b
[flang][runtime] Avoid call recursion in CopyElement runtime. (#101421)
Device compilers may fail to identify maximum stack size required
by a kernel that calls CopyElement due to potential recursive calls.
To avoid this, we can use dynamically allocated Stack. To avoid
dynamic allocations on the host for simple cases, the Stack
implementation
has a reserved space (that ends up being allocated on the program
stack).
I tested both pre-allocated and 0-reserve implementations on the host,
and all passed. The actual reserve values might be tuned as needed.
2024-08-01 09:39:25 -07:00