Skip to content

Commit

Permalink
Build discrete tests by default,
Browse files Browse the repository at this point in the history
build unified tests in package
  • Loading branch information
JehandadKhan committed Dec 21, 2023
1 parent b2eeb23 commit a719d15
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def cmake_build(Map conf=[:]){

if (package_build == true) {
config_targets = "package"
setup_args = " -DMIOPEN_TEST_DISCRETE=OFF " + setup_args
}

def miopen_install_path = "${env.WORKSPACE}/install"
Expand Down Expand Up @@ -938,7 +939,7 @@ pipeline {
}
agent{ label rocmnode("gfx908") }
environment{
setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1"
setup_flags=" -DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
Expand All @@ -957,7 +958,7 @@ pipeline {
}
agent{ label rocmnode("gfx90a") }
environment{
setup_flags="-DDISCRETE_GTEST=1 -DMIOPEN_TEST_DBSYNC=1"
setup_flags=" -DMIOPEN_TEST_DBSYNC=1"
config_targets='test_db_sync'
execute_cmd='MIOPEN_TEST_DBSYNC=1 ./bin/test_db_sync'
}
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ option( MIOPEN_TEST_CONV "" OFF)
option( MIOPEN_TEST_DEEPBENCH "" OFF)
option( MIOPEN_TEST_DRIVER_ITER_MODE "" OFF)
option( MIOPEN_TEST_COMPOSABLEKERNEL "Test with composable_kernel library" ${MIOPEN_USE_COMPOSABLEKERNEL} )
option( MIOPEN_TEST_DISCRETE "Build Discrete Test Binaries" ON)

set_var_to_condition(MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT MIOPEN_BUILD_DRIVER)
option( MIOPEN_TEST_WITH_MIOPENDRIVER "Use MIOpenDriver in tests" ${MIOPEN_TEST_WITH_MIOPENDRIVER_DEFAULT})
Expand Down
2 changes: 1 addition & 1 deletion test/gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ foreach(SOURCE ${SKIP_TESTS})
list(REMOVE_ITEM TESTS ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE})
endforeach()

if( DISCRETE_GTEST )
if( MIOPEN_TEST_DISCRETE )
foreach(TEST ${TESTS})
get_filename_component(BASE_NAME ${TEST} NAME_WE)
add_gtest(test_${BASE_NAME} ${BASE_NAME}.cpp)
Expand Down
4 changes: 2 additions & 2 deletions test/gtest/fused_conv_bias_res_add_activ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct ConvFwdBiasResAddFixture
conv_desc = conv_config.GetConv();

miopen::TensorDescriptor output_desc =
conv_desc.GetForwardOutputTensor(input.desc, weights.desc, GetDataType<T>());
conv_desc.GetForwardOutputTensor(input.desc, weights.desc, miopen_type<T>());
output = tensor<T>{tensor_layout, output_desc.GetLengths()};
std::fill(output.begin(), output.end(), std::numeric_limits<double>::quiet_NaN());

Expand Down Expand Up @@ -100,7 +100,7 @@ struct ConvFwdBiasResAddFixture
auto&& handle = get_handle();

miopen::TensorDescriptor output_desc =
conv_desc.GetForwardOutputTensor(input.desc, weights.desc, GetDataType<T>());
conv_desc.GetForwardOutputTensor(input.desc, weights.desc, miopen_type<T>());

ref_out = tensor<T>{tensor_layout, output_desc.GetLengths()};
ref_out = ref_conv_fwd(input, weights, output, conv_desc);
Expand Down

0 comments on commit a719d15

Please sign in to comment.