Backport hand-optimized compiler settings in modules from ROCM to HIP

Backport DECLSPEC settings from ROCM to HIP
pull/2883/head
Jens Steube 3 years ago
parent 219bed457f
commit 7faf6859d6

@ -131,7 +131,7 @@
#if defined IS_AMD && defined IS_GPU
#define DECLSPEC inline static
#elif defined IS_HIP
#define DECLSPEC __device__
#define DECLSPEC inline static __device__
#else
#define DECLSPEC
#endif

@ -59,6 +59,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -179,6 +179,14 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
}
}
// ROCM
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
{
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
}
}
else
{
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))

@ -58,6 +58,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -58,6 +58,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -59,6 +59,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -438,6 +438,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-fno-unroll-loops");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -81,6 +81,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -81,6 +81,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -83,25 +83,6 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
return false;
}
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
// Extra treatment for Apple systems
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{
return jit_build_options;
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
return jit_build_options;
}
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const bool potfile_disable = true;
@ -303,7 +284,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -83,25 +83,6 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
return false;
}
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
// Extra treatment for Apple systems
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{
return jit_build_options;
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
return jit_build_options;
}
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const bool potfile_disable = true;
@ -303,7 +284,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -83,25 +83,6 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
return false;
}
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
// Extra treatment for Apple systems
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{
return jit_build_options;
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
return jit_build_options;
}
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const bool potfile_disable = true;
@ -301,7 +282,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -78,6 +78,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -244,6 +244,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -245,6 +245,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -80,6 +80,17 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
native_threads = 64;
}
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
if (device_param->device_local_mem_size < 49152)
{
native_threads = 32;
}
else
{
native_threads = 64;
}
}
else
{
native_threads = 32;

@ -79,6 +79,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -60,6 +60,19 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
return pw_max;
}
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-fno-unroll-loops");
}
return jit_build_options;
}
int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len)
{
u32 *digest = (u32 *) digest_buf;
@ -179,7 +192,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -84,6 +84,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -77,6 +77,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -77,6 +77,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -58,6 +58,41 @@ static const char *SIGNATURE_OLDOFFICE = "$oldoffice$";
static const char *SIGNATURE_OLDOFFICE0 = "$oldoffice$0";
static const char *SIGNATURE_OLDOFFICE1 = "$oldoffice$1";
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
u32 native_threads = 0;
if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)
{
native_threads = 1;
}
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
{
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
{
native_threads = 8;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;
}
}
hc_asprintf (&jit_build_options, "-D FIXED_LOCAL_SIZE=%u -D _unroll", native_threads);
return jit_build_options;
}
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const u64 esalt_size = (const u64) sizeof (oldoffice01_t);
@ -273,7 +308,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -79,6 +79,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -78,6 +78,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -80,6 +80,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -84,6 +84,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -85,6 +85,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -64,6 +64,41 @@ typedef struct pdf
static const char *SIGNATURE_PDF = "$pdf$";
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
{
char *jit_build_options = NULL;
u32 native_threads = 0;
if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)
{
native_threads = 1;
}
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
{
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
{
native_threads = 8;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;
}
}
hc_asprintf (&jit_build_options, "-D FIXED_LOCAL_SIZE=%u -D _unroll", native_threads);
return jit_build_options;
}
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
{
const u64 esalt_size = (const u64) sizeof (pdf_t);
@ -369,7 +404,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hook23 = MODULE_DEFAULT;
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
module_ctx->module_hook_size = MODULE_DEFAULT;
module_ctx->module_jit_build_options = MODULE_DEFAULT;
module_ctx->module_jit_build_options = module_jit_build_options;
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;

@ -108,6 +108,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{
native_threads = 64;
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
native_threads = 64;
}
else
{
native_threads = 32;

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -73,6 +73,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -73,6 +73,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -73,6 +73,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -77,6 +77,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -81,6 +81,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -111,6 +111,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -81,6 +81,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -69,6 +69,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -69,6 +69,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -75,6 +75,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -79,6 +79,17 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
native_threads = 64;
}
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
if (device_param->device_local_mem_size < 49152)
{
native_threads = 32;
}
else
{
native_threads = 64;
}
}
else
{
native_threads = 32;

@ -76,6 +76,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -113,6 +113,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -69,6 +69,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -78,6 +78,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -78,6 +78,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -79,6 +79,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -79,6 +79,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -79,6 +79,17 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
native_threads = 64;
}
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
if (device_param->device_local_mem_size < 49152)
{
native_threads = 32;
}
else
{
native_threads = 64;
}
}
else
{
native_threads = 32;

@ -78,6 +78,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -80,6 +80,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -71,6 +71,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -86,6 +86,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -96,6 +96,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -69,6 +69,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -79,6 +79,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -72,6 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
hc_asprintf (&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -118,6 +118,17 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
native_threads = 64;
}
}
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
if (device_param->device_local_mem_size < 49152)
{
native_threads = 32;
}
else
{
native_threads = 64;
}
}
else
{
native_threads = 32;

@ -74,6 +74,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -81,6 +81,12 @@ char* module_jit_build_options(MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
hc_asprintf(&jit_build_options, "-D _unroll");
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -74,6 +74,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

@ -74,6 +74,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
return jit_build_options;
}
// HIP
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
{
hc_asprintf (&jit_build_options, "-D _unroll");
}
// ROCM
if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{

Loading…
Cancel
Save