Skip to content

Commit

Permalink
Prevent running into unsupported code-paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfp committed Jun 11, 2021
1 parent 9175551 commit e077037
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libxsmm_xcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ LIBXSMM_API_INTERN void libxsmm_xcopy_init(int archid)
}
}
#if (defined(LIBXSMM_XCOPY_JIT) && 0 != (LIBXSMM_XCOPY_JIT))
{ /* check if JIT-code generation is permitted */
if (LIBXSMM_X86_AVX2 <= libxsmm_target_archid) { /* check if JIT-code generation is permitted */
const char *const env_jit = getenv("LIBXSMM_XCOPY_JIT");
libxsmm_xcopy_jit = ((NULL == env_jit || 0 == *env_jit) ? (LIBXSMM_XCOPY_JIT) : atoi(env_jit));
}
Expand Down
8 changes: 5 additions & 3 deletions tests/matcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#if !defined(TEST_MCOPY)
# define TEST_MCOPY
#endif
#if !defined(TEST_JIT) && defined(LIBXSMM_PLATFORM_X86)
#if !defined(TEST_JIT)
# define TEST_JIT
#endif

Expand Down Expand Up @@ -146,8 +146,10 @@ int main(void)
}
}
# endif
# if defined(TEST_JIT) && (0 != LIBXSMM_JIT) /* dispatch kernel and check that it is available */
if (0 == fun && LIBXSMM_X86_SSE3 <= libxsmm_get_target_archid()
# if defined(TEST_JIT) && (0 != LIBXSMM_JIT) /* dispatch and check kernel */
if (0 == fun
&& (LIBXSMM_X86_AVX2 <= libxsmm_get_target_archid() &&
LIBXSMM_AARCH64_ALLFEAT >= libxsmm_get_target_archid())
&& (/*LIBXSMM_DATATYPE_F64 == LIBXSMM_DATATYPE(ELEM_TYPE) ||*/
LIBXSMM_DATATYPE_F32 == LIBXSMM_DATATYPE(ELEM_TYPE)))
{
Expand Down
2 changes: 1 addition & 1 deletion tests/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main(void)
otrans[fun](b, a, (unsigned int)typesize, m[test], n[test], ldi[test], ldo[test]);
nerrors += validate(a, b, c, max_size_b, m[test], n[test], ldi[test], ldo[test]);
#if (0 != LIBXSMM_JIT) /* dispatch kernel and check that it is available */
if (LIBXSMM_X86_SSE3 <= libxsmm_get_target_archid() &&
if (LIBXSMM_X86_AVX2 <= libxsmm_get_target_archid() &&
LIBXSMM_X86_ALLFEAT >= libxsmm_get_target_archid()
&& (LIBXSMM_DATATYPE_F64 == LIBXSMM_DATATYPE(ELEM_TYPE) ||
LIBXSMM_DATATYPE_F32 == LIBXSMM_DATATYPE(ELEM_TYPE)))
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
master-1.16.1-1532
master-1.16.1-1533

0 comments on commit e077037

Please sign in to comment.