<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/101560>101560</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [CUDA] non-deterministic compilation with -fgpu-rdc
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            Artem-B,
            yxsamliu
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Artem-B
      </td>
    </tr>
</table>

<pre>
    Reproducer: https://godbolt.org/z/svjcT5K6h

![image](https://github.com/user-attachments/assets/e24581bd-4c37-4ce9-971a-26e042230a99)

We're tracking used kernels via a `DenseSet` of pointers, and the enumeration order relies on the allocation order which may change from one compiler invocation to another.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ks-S2yAMxp9GvmicwbKx44MP2c340lv_TM8YFJtdDBnA2W6fvpPUne700Ato-JD0gX4qJTt75gHkExCdYua1vEdAz0D0_iOp1dntfiDPhdryEuKw3yqmYN6Hz3yNwWyaI9QnXHK-JqhPQCPQOAczBZcPIc5A40-gMd1e9Ff5qV1AnEGc9pUqkE92VTODPAMd_6li87JNBx1WoHFLHEuVs9LLyj4noFGlxI-AqZHHajJlo-uubDT3Zd9VqqSWRUNUC9X3QP3H1t8ZqIuMOSr9av2MW2KDrxw9u4Q3q1AhtOLMPvEXztAKDBe8BuszxwT0jMobzAsj-23lqLINHkM0HDGys5ww-IeunAv6o_y2WL3gqt5RL8rPjJcYVgyeUYf1ah1HtP72JycHVD7khePho__CDLXp614VPFQdkWwkUVUsQ193jT7qSXDbdaI1XV0bLbuWe0NHPraFHUhQI46iItF0QhxqQ-1Fyr5SomoaEtAIXpV1B-du632EhU1p46ESlWxF4dTELu3ceH7Dh7qDEod7Ujltc4JGOJty-lsm2-wewD1_O59AntEHXxrOHFfrbcpW7z_w--VvNi9YXubrVkajiy264T983LvsW3mN4YV1Bhof3u6I7OZvA_0KAAD__-AH8Nw">