Skip to content
Extraits de code Groupes Projets
Valider 7cc602da rédigé par Nicolas MARIE's avatar Nicolas MARIE
Parcourir les fichiers

commit

remove anzo version to avoid segv
parent 4ef6ae7a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -282,19 +282,19 @@ int main(int argc, char** argv){
cudaEventRecord(ct0);
d_shared_mult<<<dimGrid, dimBlock>>>(A_d, B_d, C_d, N);
cudaEventRecord(ct1);
cudaDeviceSynchronize();
getLastCudaError("Mult kernel Anzo failed");
cudaEventElapsedTime(&cudaDuration, ct0, ct1);
checkCudaErrors(cudaMemcpy(C_h, C_d,
sizeof(double) * N * N, cudaMemcpyDeviceToHost));
fprintf(stdout, "GPU Performance results Anzo: \n");
fprintf(stdout, " Time: %lf s\n", cudaDuration / 1000);
fprintf(stdout, " MFlops: %.2f\n", (nb_op / cudaDuration) * 1E-3);
verify_matrix(C_cpu, C_h, N);
// cudaEventRecord(ct0);
// d_shared_mult<<<dimGrid, dimBlock>>>(A_d, B_d, C_d, N);
// cudaEventRecord(ct1);
// cudaDeviceSynchronize();
// getLastCudaError("Mult kernel Anzo failed");
// cudaEventElapsedTime(&cudaDuration, ct0, ct1);
// checkCudaErrors(cudaMemcpy(C_h, C_d,
// sizeof(double) * N * N, cudaMemcpyDeviceToHost));
//
// fprintf(stdout, "GPU Performance results Anzo: \n");
// fprintf(stdout, " Time: %lf s\n", cudaDuration / 1000);
// fprintf(stdout, " MFlops: %.2f\n", (nb_op / cudaDuration) * 1E-3);
// verify_matrix(C_cpu, C_h, N);
return 0;
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter