Skip to content

Commit

Permalink
[SYCLomatic #1345] Build text_experimental_obj related cases on cpu/g…
Browse files Browse the repository at this point in the history
…pu. (#599)

Signed-off-by: Tang, Jiajun [email protected]
  • Loading branch information
tangjj11 authored Jan 17, 2024
1 parent 1160e42 commit 3f384d0
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 23 deletions.
13 changes: 0 additions & 13 deletions features/config/TEMPLATE_image_skip_cpu_gpu.xml

This file was deleted.

6 changes: 3 additions & 3 deletions features/feature_case/image/text_experimental_build_only.cu
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void Runtime_MemoryManagement() {
void Runtime_TextureObjectManagement() {
int i = 1;
cudaChannelFormatKind k = cudaChannelFormatKindSigned;
cudaTextureObject_t o{0}; // TODO: need not "{0}".
cudaTextureObject_t o;
cudaResourceDesc r;
cudaTextureDesc t;
// cudaResourceViewDesc v; // TODO: need support.
Expand Down Expand Up @@ -101,7 +101,7 @@ void Driver_MemoryManagement() {
}

void Driver_TextureObjectManagement() {
CUtexObject o{0}; // TODO: need not "{0}".
CUtexObject o;
CUDA_RESOURCE_DESC R;
CUDA_TEXTURE_DESC T;
// CUDA_RESOURCE_VIEW_DESC V; // TODO: need support.
Expand All @@ -116,7 +116,7 @@ int main() {
Runtime_TextureObjectManagement();
Driver_MemoryManagement();
Driver_TextureObjectManagement();
cudaTextureObject_t tex{0}; // TODO: need not "{0}".
cudaTextureObject_t tex;
CppLanguageExtensions_TextureFunctions<<<1, 1>>>(tex);
return 0;
}
2 changes: 1 addition & 1 deletion features/feature_case/image/text_experimental_obj_array.cu
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ getTex(cudaArray_t input,
texDesc.filterMode = textureFilterMode;
texDesc.normalizedCoords = normalizedCoords;

cudaTextureObject_t tex{0}; // TODO: need not "{0}".
cudaTextureObject_t tex;
cudaCreateTextureObject(&tex, &resDesc, &texDesc, NULL);

return tex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ cudaTextureObject_t getTex(void *input, cudaChannelFormatDesc desc,
cudaTextureDesc texDesc;
memset(&texDesc, 0, sizeof(texDesc));

cudaTextureObject_t tex{0}; // TODO: need not "{0}".
cudaTextureObject_t tex;
cudaCreateTextureObject(&tex, &resDesc, &texDesc, NULL);

return tex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ getTex(void *input, size_t w, size_t h, cudaChannelFormatDesc desc,
texDesc.filterMode = textureFilterMode;
texDesc.normalizedCoords = normalizedCoords;

cudaTextureObject_t tex{0}; // TODO: need not "{0}".
cudaTextureObject_t tex;
cudaCreateTextureObject(&tex, &resDesc, &texDesc, NULL);

return tex;
Expand Down
6 changes: 3 additions & 3 deletions features/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@
<test testName="image" configFile="config/TEMPLATE_image.xml" />
<test testName="text_experimental_build_only" configFile="config/TEMPLATE_image.xml" />
<test testName="text_experimental_build_only_before12" configFile="config/TEMPLATE_image_before_12.xml" />
<test testName="text_experimental_obj_array" configFile="config/TEMPLATE_image_skip_cpu_gpu.xml" />
<test testName="text_experimental_obj_linear" configFile="config/TEMPLATE_image_skip_cpu_gpu.xml" />
<test testName="text_experimental_obj_pitch2d" configFile="config/TEMPLATE_image_skip_cpu_gpu.xml" />
<test testName="text_experimental_obj_array" configFile="config/TEMPLATE_image.xml" />
<test testName="text_experimental_obj_linear" configFile="config/TEMPLATE_image.xml" />
<test testName="text_experimental_obj_pitch2d" configFile="config/TEMPLATE_image.xml" />
<test testName="text_obj_array" configFile="config/TEMPLATE_image_skip_cuda.xml" />
<test testName="text_obj_linear" configFile="config/TEMPLATE_image_skip_cuda.xml" />
<test testName="text_obj_pitch2d" configFile="config/TEMPLATE_image_skip_cuda.xml" />
Expand Down
3 changes: 2 additions & 1 deletion features/test_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'cudnn-GetErrorString', 'cub_device_histgram', 'peer_access',
'cudnn-types', 'cudnn-version', 'cudnn-dropout', 'const_opt',
'constant_attr', 'sync_warp_p2', 'occupancy_calculation',
'text_experimental_obj_array', 'text_experimental_obj_linear', 'text_experimental_obj_pitch2d',
'text_obj_array', 'text_obj_linear', 'text_obj_pitch2d', 'match',
'thrust-unique_by_key', 'cufft_test', 'cufft-external-workspace', "pointer_attributes", 'math_intel_specific', 'math-drcp', 'thrust-pinned-allocator', 'driverMem',
'cusolver_test1', 'cusolver_test2', 'cusolver_test3', 'cusolver_test4', 'cusolver_test5', 'thrust_op', 'cublas-extension', 'cublas_v1_runable', 'thrust_minmax_element',
Expand Down Expand Up @@ -195,6 +194,8 @@ def build_test():
ret = compile_and_link(srcs, cmp_options, objects, link_opts)
elif re.match('^cufft.*', test_config.current_test) and platform.system() == 'Linux':
ret = compile_and_link(srcs, cmp_options, objects, link_opts)
elif test_config.current_test.startswith('text_experimental_obj_') and test_config.device_filter == "cuda:gpu":
ret = compile_and_link(srcs, cmp_options, objects, link_opts)
else:
ret = compile_files(srcs, cmp_options)
return ret
Expand Down

0 comments on commit 3f384d0

Please sign in to comment.