Update atomic functional tests (#262)

* feat: implement function to return number of blocks in grid.

* test: update atomics functional tests
  - Standard atomic tests: `atomic_add`, `atomic_inc`, `fetch_atomic_add`, `fetch_atomic_inc`, and `fetch_compare_and_swap`
  - Bitwise atomic tests:    `atomic_and`, `atomic_or`, `atomic_xor`, fetch_atomic_and`, `fetch_atomic_or`, and `fetch_atomic_xor`
  - Extended atomic tests: `atomic_fetch`, `atomic_set`, and `atomic_swap`

* Added two different address modes for atomics.
* Added all supported data types for atomics tests.
Bu işleme şunda yer alıyor:
Avinash Kethineedi
2025-10-06 11:50:50 -04:00
işlemeyi yapan: GitHub
ebeveyn 2bf1f889ad
işleme 0a4f8a83b9
9 değiştirilmiş dosya ile 676 ekleme ve 265 silme
+7
Dosyayı Görüntüle
@@ -191,6 +191,13 @@ __device__ __forceinline__ int get_flat_block_id() {
hipThreadIdx_z * hipBlockDim_x * hipBlockDim_y;
}
/*
* Returns the number of blocks in the caller's flattened grid.
*/
__device__ __forceinline__ int get_grid_num_blocks() {
return hipGridDim_x * hipGridDim_y * hipGridDim_z;
}
/*
* Returns the flattened block index that the calling thread is a member of in
* in the grid. Callers from the same block will have the same index.