Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2021-11-11 00:28:03 +0300
committerThomas Dinges <blender@dingto.org>2021-11-11 00:28:03 +0300
commit9ca8bf0b29470c03d32a83ad9cf15efe3c5928ab (patch)
tree1ce70c17297407fc764b5a7124e1db3534776447 /intern/cycles/device/hip
parent3fa86f4b280cbc6ccc18993c089b94dda45afa34 (diff)
parent040630bb9a634988f45fd9f8e480f39c195ec57b (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'intern/cycles/device/hip')
-rw-r--r--intern/cycles/device/hip/device_impl.cpp20
-rw-r--r--intern/cycles/device/hip/device_impl.h3
2 files changed, 9 insertions, 14 deletions
diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp
index bb0573abf8d..d7f68934b46 100644
--- a/intern/cycles/device/hip/device_impl.cpp
+++ b/intern/cycles/device/hip/device_impl.cpp
@@ -222,7 +222,6 @@ string HIPDevice::compile_kernel_get_common_cflags(const uint kernel_features)
const string include_path = source_path;
string cflags = string_printf(
"-m%d "
- "--ptxas-options=\"-v\" "
"--use_fast_math "
"-DHIPCC "
"-I\"%s\"",
@@ -236,8 +235,7 @@ string HIPDevice::compile_kernel_get_common_cflags(const uint kernel_features)
string HIPDevice::compile_kernel(const uint kernel_features,
const char *name,
- const char *base,
- bool force_ptx)
+ const char *base)
{
/* Compute kernel name. */
int major, minor;
@@ -255,13 +253,11 @@ string HIPDevice::compile_kernel(const uint kernel_features,
/* Attempt to use kernel provided with Blender. */
if (!use_adaptive_compilation()) {
- if (!force_ptx) {
- const string fatbin = path_get(string_printf("lib/%s_%s.fatbin", name, arch));
- VLOG(1) << "Testing for pre-compiled kernel " << fatbin << ".";
- if (path_exists(fatbin)) {
- VLOG(1) << "Using precompiled kernel.";
- return fatbin;
- }
+ const string fatbin = path_get(string_printf("lib/%s_%s.fatbin", name, arch));
+ VLOG(1) << "Testing for pre-compiled kernel " << fatbin << ".";
+ if (path_exists(fatbin)) {
+ VLOG(1) << "Using precompiled kernel.";
+ return fatbin;
}
}
@@ -298,9 +294,9 @@ string HIPDevice::compile_kernel(const uint kernel_features,
# ifdef _WIN32
if (!use_adaptive_compilation() && have_precompiled_kernels()) {
- if (major < 3) {
+ if (!hipSupportsDevice(hipDevId)) {
set_error(
- string_printf("HIP backend requires compute capability 3.0 or up, but found %d.%d. "
+ string_printf("HIP backend requires compute capability 10.1 or up, but found %d.%d. "
"Your GPU is not supported.",
major,
minor));
diff --git a/intern/cycles/device/hip/device_impl.h b/intern/cycles/device/hip/device_impl.h
index 8d81291d15e..eb832ad828c 100644
--- a/intern/cycles/device/hip/device_impl.h
+++ b/intern/cycles/device/hip/device_impl.h
@@ -95,8 +95,7 @@ class HIPDevice : public Device {
string compile_kernel(const uint kernel_features,
const char *name,
- const char *base = "hip",
- bool force_ptx = false);
+ const char *base = "hip");
virtual bool load_kernels(const uint kernel_features) override;
void reserve_local_memory(const uint kernel_features);