diff --git a/.azure-pipelines/cuda-unit-test.yml b/.azure-pipelines/cuda-unit-test.yml index 1f97ece3..df90555c 100644 --- a/.azure-pipelines/cuda-unit-test.yml +++ b/.azure-pipelines/cuda-unit-test.yml @@ -20,13 +20,13 @@ steps: make postinstall displayName: Install dependencies - script: | - SB_MICRO_PATH=$PWD/bin make cppbuild + SB_MICRO_PATH=$PWD make cppbuild displayName: Build benchmarks - script: | python3 setup.py lint displayName: Run code lint - script: | - SB_MICRO_PATH=$PWD/bin python3 setup.py test + SB_MICRO_PATH=$PWD python3 setup.py test displayName: Run unit tests timeoutInMinutes: 10 - script: | diff --git a/superbench/benchmarks/build.sh b/superbench/benchmarks/build.sh index 0a0fb12b..d4effb0b 100755 --- a/superbench/benchmarks/build.sh +++ b/superbench/benchmarks/build.sh @@ -4,8 +4,7 @@ # Licensed under the MIT License -SB_MICRO_PATH="${SB_MICRO_PATH:-/usr/local/bin}" -SB_MICRO_LIB="${SB_MICRO_LIB:-/usr/local/lib}" +SB_MICRO_PATH="${SB_MICRO_PATH:-/usr/local}" for dir in micro_benchmarks/*/ ; do if [ -f $dir/CMakeLists.txt ]; then diff --git a/superbench/benchmarks/micro_benchmarks/kernel_launch_overhead/CMakeLists.txt b/superbench/benchmarks/micro_benchmarks/kernel_launch_overhead/CMakeLists.txt index 77641068..a78afd4d 100644 --- a/superbench/benchmarks/micro_benchmarks/kernel_launch_overhead/CMakeLists.txt +++ b/superbench/benchmarks/micro_benchmarks/kernel_launch_overhead/CMakeLists.txt @@ -8,4 +8,4 @@ include(../cuda_common.cmake) add_executable(kernel_launch_overhead cuda_kernel_launch.cu) set_property(TARGET kernel_launch_overhead PROPERTY CUDA_ARCHITECTURES ${NVCC_ARCHS_SUPPORTED}) -install (TARGETS kernel_launch_overhead RUNTIME DESTINATION .) +install(TARGETS kernel_launch_overhead RUNTIME DESTINATION bin) diff --git a/superbench/benchmarks/micro_benchmarks/micro_base.py b/superbench/benchmarks/micro_benchmarks/micro_base.py index 948c0ea9..d6daf65f 100644 --- a/superbench/benchmarks/micro_benchmarks/micro_base.py +++ b/superbench/benchmarks/micro_benchmarks/micro_base.py @@ -145,8 +145,10 @@ class MicroBenchmarkWithInvoke(MicroBenchmark): return False # Set the environment path. - if 'SB_MICRO_PATH' in os.environ: - os.environ['PATH'] = os.getenv('SB_MICRO_PATH', '') + os.pathsep + os.getenv('PATH', '') + if os.getenv('SB_MICRO_PATH'): + os.environ['PATH'] = os.path.join(os.getenv('SB_MICRO_PATH'), 'bin') + os.pathsep + os.getenv('PATH', '') + os.environ['LD_LIBRARY_PATH'] = os.path.join(os.getenv('SB_MICRO_PATH'), + 'lib') + os.pathsep + os.getenv('LD_LIBRARY_PATH', '') if not self._set_binary_path(): return False