| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Add GPU support for the 'system' function (#109687) Summary: This function can easily be implemented by forwarding it to the host process. This shows up in a few places that we might want to test the GPU so it should be provided. Also, I find the idea of the GPU offloading work to the CPU via system very funny. | 1 年前 | |
[libc][NFC] Rename RPC opcodes to better reflect their usage Summary: RPC_ is a generic prefix here, use LIBC_ to indicate that these are opcodes used to implement the C library | 1 年前 | |
[libc] Efficiently implement aligned_alloc for AMDGPU (#146585) Summary: This patch uses the actual allocator interface to implement aligned_alloc. We do this by simply rounding up the amount allocated. Because of how index calculation works, any offset within an allocated pointer will still map to the same chunk, so we can just adjust internally and it will free all the same. | 1 年前 | |
[libc] Implement placeholder memory functions on the GPU (#101082) Summary: These functions are needed for libc++ to link successfully. We can't implement them well currently, so simply provide some stand-in implementations. realloc will currently copy garbage and potentially fault and aligned_alloc will work unless your alignment is more than 4K alignment. However, these should work in practice to get tests running. I will write a real allocator soon™. | 1 年前 | |
[libc] Use the NVIDIA device allocator for GPU malloc (#124277) Summary: This is a blocker on another patch in the OpenMP runtime. The problem is that NVIDIA truly doesn't handle RPC-based allocations very well. It cannot reliably update the MMU while a kernel is running and it will usually deadlock if called from a separate thread due to internal use of TLS. This patch just removes the definition of malloc and free for NVPTX. The result here is that they will be undefined, which is the cue for the nvlink linker to define them for us. So, as far as libc is concerned it still implements malloc. | 1 年前 | |
[libc] Use the NVIDIA device allocator for GPU malloc (#124277) Summary: This is a blocker on another patch in the OpenMP runtime. The problem is that NVIDIA truly doesn't handle RPC-based allocations very well. It cannot reliably update the MMU while a kernel is running and it will usually deadlock if called from a separate thread due to internal use of TLS. This patch just removes the definition of malloc and free for NVPTX. The result here is that they will be undefined, which is the cue for the nvlink linker to define them for us. So, as far as libc is concerned it still implements malloc. | 1 年前 | |
[libc] Efficiently implement 'realloc' for AMDGPU devices (#145960) Summary: Now that we have malloc we can implement realloc efficiently. This uses the known chunk sizes to avoid unnecessary allocations. We just return nullptr for NVPTX. I'd remove the list for the entrypoint but then the libc++ code would stop working. When someone writes the NVPTX support this will be trivial. | 1 年前 | |
[libc][NFC] Rename RPC opcodes to better reflect their usage Summary: RPC_ is a generic prefix here, use LIBC_ to indicate that these are opcodes used to implement the C library | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 |