diff --git a/README.md b/README.md index 2fbe6f871..c66ffe05c 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Mission critical computational science and engineering applications from the pub - Fortan 90 compiler - CUDA 9 or later - - HIP 3.5 or later + - HIP 4.2 or later - SYCL 2020 or later - OpenCL 2.0 or later - OpenMP 4.0 or later @@ -151,4 +151,4 @@ OCCA is available under a [MIT license](LICENSE.MD) [CMake]: https://cmake.org/ -[Env_Modules]: https://modules.readthedocs.io/en/latest/index.html \ No newline at end of file +[Env_Modules]: https://modules.readthedocs.io/en/latest/index.html diff --git a/src/occa/internal/modes/hip/device.cpp b/src/occa/internal/modes/hip/device.cpp index 818d9917f..56678c6b7 100644 --- a/src/occa/internal/modes/hip/device.cpp +++ b/src/occa/internal/modes/hip/device.cpp @@ -216,14 +216,7 @@ namespace occa { ); if (hipccCompilerFlags.find("-arch=sm") == std::string::npos && -#if HIP_VERSION >= 502 - hipccCompilerFlags.find("--offload-arch=gfx") == std::string::npos -#elif HIP_VERSION >= 305 - hipccCompilerFlags.find("--amdgpu-target=gfx") == std::string::npos -#else - hipccCompilerFlags.find("-t gfx") == std::string::npos -#endif - ) { + hipccCompilerFlags.find("--offload-arch=gfx") == std::string::npos) { std::string archString = kernelProps.get("arch", arch); @@ -231,13 +224,7 @@ namespace occa { if (startsWith(archString, "sm_")) { archFlag = " -arch=" + archString; } else if (startsWith(archString, "gfx")) { -#if HIP_VERSION >= 502 archFlag = " --offload-arch=" + archString; -#elif HIP_VERSION >= 305 - archFlag = " --amdgpu-target=" + archString; -#else - archFlag = " -t " + archString; -#endif } else { OCCA_FORCE_ERROR("Unknown HIP arch"); } @@ -274,13 +261,9 @@ namespace occa { //---[ Compiling Command ]-------- command << compiler << " --genco" -#if defined(__HIP_PLATFORM_NVIDIA__) || (HIP_VERSION >= 305) << ' ' << compilerFlags -#else - << " -f=\\\"" << compilerFlags << "\\\"" -#endif << ' ' << hipccCompilerFlags; -#if defined(__HIP_PLATFORM_NVIDIA__) || (HIP_VERSION >= 305) + const bool includeOcca = kernelProps.get("kernel/include_occa", false); const bool linkOcca = kernelProps.get("kernel/link_occa", false); if (includeOcca) { @@ -291,7 +274,6 @@ namespace occa { /* NC: hipcc doesn't seem to like linking a library in */ //<< " -L" << env::OCCA_INSTALL_DIR << "lib -locca"; } -#endif command << ' ' << sourceFilename << " -o " << binaryFilename << " 2>&1";