Page MenuHomePhabricator

[OpenMP][Clang][NVPTX] Only build one bitcode library for each SM
ClosedPublic

Authored by tianshilei1992 on Feb 22 2021, 8:31 AM.

Details

Summary

In D97003, CUDA 9.2 is the minimum requirement for OpenMP offloading on
NVPTX target. We don't need to have macros in source code to select right functions
based on CUDA version. we don't need to compile multiple bitcode libraries of
different CUDA versions for each SM. We don't need to worry about future
compatibility with newer CUDA version.

-target-feature +ptx61 is used in this patch, which corresponds to the highest
PTX version that CUDA 9.2 can support.

Diff Detail

Unit TestsFailed

TimeTest
190 msx64 debian > Profile-x86_64.Profile-x86_64::instrprof-gc-sections.c
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang -m64 -ldl -fprofile-instr-generate=/mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/profile/Profile-x86_64/Output/instrprof-gc-sections.c.tmp.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/profile/Profile-x86_64/Output/instrprof-gc-sections.c.tmp /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/profile/instrprof-gc-sections.c

Event Timeline

tianshilei1992 created this revision.Feb 22 2021, 8:31 AM
tianshilei1992 requested review of this revision.Feb 22 2021, 8:31 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 22 2021, 8:31 AM

use ptx61 instead

tianshilei1992 edited the summary of this revision. (Show Details)Feb 22 2021, 10:49 AM

rebase and ping

This revision is now accepted and ready to land.Mar 7 2021, 8:18 PM
This revision was landed with ongoing or failed builds.Mar 8 2021, 9:03 AM
This revision was automatically updated to reflect the committed changes.