<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/125163>125163</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
the following openacc code for matrix multiplication works in nvc++ on the nvidia device and fails on the target on clang. It does not update the host after acc_update_self. clang also puts wrong parameters into a function on the host
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bschulz81
</td>
</tr>
</table>
<pre>
Compared to last time,
i replaced the mapping macros with acc_copyin, acc_create, acc_attach, acc_update_self and acc_detach and acc_exit functions.
One can now clearly see that they do not work clang 20.0.0_pre20250122
the data for the matrix multiplication is not downloaded and probably also not uploaded or attached, one sees the zero results in the output
and the function for the lu decomposition can not access the device buffer if uploaded on the device.
however, what is more, the lu decomposition seems to work if we want to multiply on device only.
But in fact, it calculation is done on the host because the parameter algorithm.gpu_offload that is the function supplied to matrix_multiply_dot is set to false by clang despite me having set it to true!
As far as i can see, my code is now fully within the openmp and openacc standards.
This is certainly a strange output. i never saw a compiler apparently changing function parameters...
a debug shows that on nvc++ they are supplied correctly...
[mdspan_acc.h.txt](https://github.com/user-attachments/files/18612948/mdspan_acc.h.txt)
[main_acc.cpp.txt](https://github.com/user-attachments/files/18612950/main_acc.cpp.txt)
[CMakeLists.txt](https://github.com/user-attachments/files/18612951/CMakeLists.txt)
[clangoutput.txt](https://github.com/user-attachments/files/18612961/clangoutput.txt)
[nvc++output.txt](https://github.com/user-attachments/files/18612971/nvc%2B%2Boutput.txt)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJysVU-P27gP_TTOhahhK-OZzCGHzBQBfsBvsZe9B7RE29rKkiBKcdNPv5CcZNJusacBAjj6x0c-ko_IrEdLtK-6t6r7usEUJxf2PcspmR-7dtM7ddm_u9ljIAXRgUGOEPVMlXivmoOGQN6gzIcTwYzeazvCjDI4hkXHCVDKk3T-om0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