ROCm / HIPIFY

HIPIFY: Convert CUDA to Portable C++ Code
https://rocm.docs.amd.com/projects/HIPIFY/en/latest/
MIT License
524 stars 75 forks source link

[HIPIFY] An argument of a function used as macro argument is not hipified #9

Closed emankov closed 4 years ago

emankov commented 8 years ago

Example (Shoc's NeuralNet.cu):

CUDA_SAFE_CALL(cudaMemcpy(&D__TRAINING_DATA_X_2D[i_IMAGE_SIZE], TRAINING_DATA_X[i], sizeof(float)_IMAGE_SIZE, cudaMemcpyHostToDevice));

where:

define CUDA_SAFECALL(call) /..._/

After hipifying now: CUDA_SAFE_CALL(hipMemcpy(&D__TEST_DATA_X_2D[i_IMAGE_SIZE], TEST_DATA_X[i], sizeof(float)_IMAGE_SIZE, cudaMemcpyHostToDevice));

Should be: CUDA_SAFE_CALL(hipMemcpy(&D__TEST_DATA_X_2D[i_IMAGE_SIZE], TEST_DATA_X[i], sizeof(float)_IMAGE_SIZE, hipMemcpyHostToDevice));

emankov commented 7 years ago

Fixed. /gerritgit/compute/ec/hip (amd-develop branch): SHA-1: 5ec0488c