Hi, On 26.09.22 19:45, Alexander Monakov wrote: My main concerns remain not addressed: 1) what I said in the opening paragraphs of my previous email; (i.e. the general disagreement whether the feature itself should be implemented for nvptx or not.) 2) device-issued atomics are not guaranteed to appear atomic to the host unless using atom.sys and translating for CUDA compute capability 6.0+. As you seem to have no other rough review comments, this can now be addressed :-) We do support #if __PTX_SM__ >= 600 (CUDA >= 8.0, ptx isa >= 5.0) and we also can configure GCC with --with-arch=sm_70 (or sm_80 or ...) Thus, adding atomics with .sys scope is possible. See attached patch. This seems to work fine and I hope I got the assembly right in terms of atomic use. (And I do believe that the .release/.acquire do not need an additional __sync_syncronize()/"membar.sys".) Ignoring (1), does the overall patch and this part otherwise look okay(ish)? Caveat: The .sys scope works well with >= sm_60 but not does not handle older versions. For those, the __atomic_{load/store}_n are used. I do not see a good solution beyond documentation. In the way it is used (one thread only setting only on/off flag, no atomic increments etc.), I think it is unlikely to cause races without .sys scope, but as always is difficult to rule out some special unfortunate case where it does. At lease we do have now some documentation (in general) - which still needs to be expanded and improved. For this feature, I did not add any wording in this patch: until the feature is actually enabled, it would be more confusing than helpful. On Mon, 26 Sep 2022, Tobias Burnus wrote: In theory, compiling with "-m32 -foffload-options=-m64" or "-m32 -foffload-options=-m32" or "-m64 -foffload-options=-m32" is supported. I have no words. @node Nvidia PTX Options ... @item -m64 @opindex m64 Ignored, but preserved for backward compatibility. Only 64-bit ABI is supported. And in config/nvptx/mkoffload.cc you also still find leftovers from -m32. Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955