diff --git a/projects/hip/src/hip_hcc.cpp b/projects/hip/src/hip_hcc.cpp index 09b4770347..1cf8745c0b 100644 --- a/projects/hip/src/hip_hcc.cpp +++ b/projects/hip/src/hip_hcc.cpp @@ -1090,6 +1090,7 @@ inline hipStream_t ihipSyncAndResolveStream(hipStream_t stream) // Allows runtime to track some information about the stream. hipStream_t ihipPreLaunchKernel(hipStream_t stream, hc::accelerator_view **av) { + std::call_once(hip_initialized, ihipInit); stream = ihipSyncAndResolveStream(stream); stream->preKernelCommand(); diff --git a/projects/hip/tests/src/hipEnvVarDriver.cpp b/projects/hip/tests/src/hipEnvVarDriver.cpp index ebb1be956d..21884f00b1 100644 --- a/projects/hip/tests/src/hipEnvVarDriver.cpp +++ b/projects/hip/tests/src/hipEnvVarDriver.cpp @@ -98,6 +98,6 @@ int main() { setenv("HIP_VISIBLE_DEVICES","-100,0,1",1); assert(getDeviceNumber() == 0); - std::cout << "Passed!" << std::endl; + std::cout << "PASSED" << std::endl; return 0; } diff --git a/projects/hip/tests/src/hipKernel.cpp b/projects/hip/tests/src/hipKernel.cpp new file mode 100644 index 0000000000..6bf089bc4e --- /dev/null +++ b/projects/hip/tests/src/hipKernel.cpp @@ -0,0 +1,8 @@ +#include"test_common.h" + +__global__ void Empty(hipLaunchParm lp, int param){} + +int main(){ +hipLaunchKernel(HIP_KERNEL_NAME(Empty), dim3(1), dim3(1), 0, 0, 0); +hipDeviceSynchronize(); +} diff --git a/projects/hip/tests/src/hipMultiThreadStreams2.cpp b/projects/hip/tests/src/hipMultiThreadStreams2.cpp index c72d087db0..8d75a12725 100644 --- a/projects/hip/tests/src/hipMultiThreadStreams2.cpp +++ b/projects/hip/tests/src/hipMultiThreadStreams2.cpp @@ -1,3 +1,25 @@ +/* +Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + #include #include"test_common.h" #include