dimanche 20 juin 2021

can a AMD gpu memory be read/write directly?

in roc_shmem open source: https://github.com/ROCm-Developer-Tools/ROC_SHMEM

./library/src/gpu_ib/backend.cpp:51

code like this:

    CHECK_HIP(hipMalloc((void**) &bufferTokens,
                        sizeof(unsigned int) * num_wgs));

    for (int i = 0; i < num_wgs; i++) {
        bufferTokens[i] = 0;
    }

actually this code will cause a coredump in my setup. my question is can "bufferTokens" be initialized like this? if true, how can I let it work well?

Aucun commentaire:

Enregistrer un commentaire