1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

edited readme amd stack err

This commit is contained in:
atif4461 2023-09-08 21:31:08 -04:00
parent 5a5c481d45
commit e5bc51779a
2 changed files with 12 additions and 1 deletions

View File

@ -487,11 +487,16 @@ inline void acceleratorCopySynchronise(void) { hipStreamSynchronize(copyStream);
//OpenMP Target Offloading
#ifdef OMPTARGET
#include<omp.h>
//extern "C" void *memcpy(void *a, const void* b, size_t count);
extern "C" void *llvm_omp_target_alloc_host (size_t Size, int DeviceNum);
extern "C" void *llvm_omp_target_alloc_device(size_t Size, int DeviceNum);
extern "C" void *llvm_omp_target_alloc_shared(size_t Size, int DeviceNum);
//TODO: Dynamic Shared Memory
#pragma omp begin declare variant match(device={kind(gpu)})
void * memcpy ( void * d, const void * s, size_t num ) { return __builtin_memcpy(d, s, num); }
#pragma omp end declare variant
#define THREAD_LIMIT acceleratorThreads()
#define accelerator
@ -543,7 +548,11 @@ inline void acceleratorCopyFromDevice(void *from,void *to,size_t bytes)
}
std::cout << "D->H copy from device end "<<std::endl;
};
inline void acceleratorCopyDeviceToDeviceAsynch(void *from,void *to,size_t bytes) { printf("TODO acceleratorCopyDeviceToDeviceAsynch");memcpy(to,from,bytes);}
inline void acceleratorCopyDeviceToDeviceAsynch(void *from,void *to,size_t bytes)
{
printf("TODO acceleratorCopyDeviceToDeviceAsynch");
//memcpy(to,from,bytes);
}
inline void acceleratorCopySynchronise(void) {printf("TODO acceleratorCopySynchronize");};
inline int acceleratorIsCommunicable(void *ptr){ return 1; }

View File

@ -2,6 +2,8 @@ module load rocm/5.5.1
mkdir build-amd-err && cd build-amd-err
cp ../amd-omp-stack-err/Test.cc ../amd-omp-stack-err/WilsonFermionInstantiationWilsonImplD.cc .
../configure CXX=amdclang++ --enable-comms=none --enable-simd=GEN --enable-accelerator-cshift=no --enable-shm=no --disable-unified --enable-unified=no --enable-fermion-reps=no --enable-gen-simd-width=16 CXXFLAGS="-Wno-unknown-cuda-version -fopenmp --offload-arch=gfx90a -std=c++14 -fopenmp-cuda-mode -O3 -g -Wformat -DEIGEN_NO_CUDA -DEIGEN_DONT_VECTORIZE -DOMPTARGET"
amdclang++ -c Test.cc -o Test.o -I/autofs/nccs-svm1_home1/atif/Grid -I/autofs/nccs-svm1_home1/atif/Grid/build-amd-err/Grid/ -O3 -Wno-unknown-cuda-version -fopenmp --offload-arch=gfx90a -std=c++14 -fopenmp-cuda-mode -O3 -Wformat -DEIGEN_NO_CUDA -DOMPTARGET -fno-strict-aliasing