Emerge-Lab / gpudrive

GPU-acceleration of Nocturne via Madrona
https://arxiv.org/abs/2408.01584
MIT License
227 stars 20 forks source link

Zero initialize observations #206

Closed SamanKazemkhani closed 3 months ago

SamanKazemkhani commented 3 months ago

On a GPU, it seems either Madrona or the CUDA runtime zero-initializes the memory backing PartnerObservations and AgentMapObservations. On a CPU, this memory is left uninitialized which manifests itself as some floats taking on a nan value.

This PR zero-initializes PartnerObservation and AgentMapObservation which are unfilled. Note that k-NN already zero-initializes unfilled features and so does not need updating.

aaravpandya commented 3 months ago

Looks good. Can you also take a look at #174 which is a similar issue ? Does it need to be closed ?