Fix issues related to -Werror in hip tests (#396)
* Fix issues related to -Werror
* Correct the skipped tests
[ROCm/hip-tests commit: 605d5eee5d]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
GitHub
ebeveyn
0f844d75a4
işleme
039a0b615a
@@ -19,15 +19,17 @@
|
||||
"Unit_hipDestroyExternalSemaphore_Vulkan_Negative_Parameters",
|
||||
"Unit_Grid_Group_Sync_Positive_Basic",
|
||||
"=== Below hiprtc tests are disabled temporarily, will be renabled once patches for SWDEV-395996 are merged ===",
|
||||
"Unit_hiprtc_saxpy.Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize.Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional.Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc.Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17.Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling.Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname.Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16.Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI.Unit_RTC_LinkerAPI"
|
||||
"Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI",
|
||||
"Unit_hiprtc_half_shuffle",
|
||||
"Unit_hiprtc_includepath"
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
@@ -120,14 +120,16 @@
|
||||
"Unit_hipStreamCreateWithPriority_ValidateWithEvents",
|
||||
"Unit_hipEventIpc",
|
||||
"=== Below hiprtc tests are disabled temporarily, will be renabled once patches for SWDEV-395996 are merged ===",
|
||||
"Unit_hiprtc_saxpy.Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize.Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional.Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc.Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17.Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling.Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname.Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16.Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI.Unit_RTC_LinkerAPI"
|
||||
"Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI",
|
||||
"Unit_hiprtc_half_shuffle",
|
||||
"Unit_hiprtc_includepath"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -107,14 +107,16 @@
|
||||
"Unit_hipStreamCreateWithPriority_MulthreadNonblockingflag",
|
||||
"Unit_hipDeviceGetUuid_Positive",
|
||||
"=== Below hiprtc tests are disabled temporarily, will be renabled once patches for SWDEV-395996 are merged ===",
|
||||
"Unit_hiprtc_saxpy.Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize.Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional.Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc.Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17.Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling.Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname.Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16.Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI.Unit_RTC_LinkerAPI"
|
||||
"Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI",
|
||||
"Unit_hiprtc_half_shuffle",
|
||||
"Unit_hiprtc_includepath"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -226,14 +226,16 @@
|
||||
"Unit_hipTextureMipmapRef2D_Positive_Check",
|
||||
"Unit_hipTextureMipmapRef2D_Negative_Parameters",
|
||||
"=== Below hiprtc tests are disabled temporarily, will be renabled once patches for SWDEV-395996 are merged ===",
|
||||
"Unit_hiprtc_saxpy.Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize.Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional.Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc.Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17.Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling.Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname.Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16.Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI.Unit_RTC_LinkerAPI"
|
||||
"Unit_hiprtc_saxpy",
|
||||
"Unit_hiprtc_warpsize",
|
||||
"Unit_hiprtc_functional",
|
||||
"Unit_hipStreamCaptureRtc",
|
||||
"Unit_hiprtc_cpp17",
|
||||
"Unit_hiprtc_namehandling",
|
||||
"Unit_hiprtc_getloweredname",
|
||||
"Unit_hiprtc_test_hip_bfloat16",
|
||||
"Unit_RTC_LinkerAPI",
|
||||
"Unit_hiprtc_half_shuffle",
|
||||
"Unit_hiprtc_includepath"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -181,7 +181,6 @@ bool run_llrint() {
|
||||
int passed = 0;
|
||||
for (int i = 0; i < 512; i++) {
|
||||
int x = round(A[i]);
|
||||
int64_t y = x;
|
||||
if (B[i] == x) {
|
||||
passed = 1;
|
||||
}
|
||||
|
||||
@@ -20,5 +20,5 @@ THE SOFTWARE.
|
||||
TEST_CASE("Unit_hipTestDeviceLimit_Basic") {
|
||||
size_t heap;
|
||||
HIP_CHECK(hipDeviceGetLimit(&heap, hipLimitMallocHeapSize));
|
||||
REQUIRE(heap != NULL);
|
||||
REQUIRE(heap != 0);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,6 @@ TEST_CASE("Unit_hipGetSymbolAddressAndSize_Validation") {
|
||||
bool* checkOkD{nullptr};
|
||||
bool checkOk = false;
|
||||
size_t symbolSize{};
|
||||
int* symbolArrAddress{};
|
||||
float* symbolVarAddress{};
|
||||
|
||||
SECTION("Validate symbol size/address of static const variable") {
|
||||
|
||||
@@ -45,10 +45,10 @@ __global__ static void DotFunctions(bool* result) {
|
||||
|
||||
TEST_CASE("Unit_hipTestDotFunctions") {
|
||||
bool* result{nullptr};
|
||||
hipHostMalloc(&result, 1);
|
||||
HIP_CHECK(hipHostMalloc(&result, 1));
|
||||
result[0] = true;
|
||||
hipLaunchKernelGGL(DotFunctions, dim3(1, 1, 1), dim3(1, 1, 1), 0, 0, result);
|
||||
hipDeviceSynchronize();
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
REQUIRE(result[0] == true);
|
||||
hipHostFree(result);
|
||||
HIP_CHECK(hipHostFree(result));
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ THE SOFTWARE.
|
||||
#include <hip/hip_fp16.h>
|
||||
#include <hip_test_common.hh>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
__device__ void test_convert() {
|
||||
__half x;
|
||||
float y = static_cast<float>(x);
|
||||
|
||||
@@ -147,9 +147,6 @@ __device__ bool check_modf() {
|
||||
__device__ bool check_nextafterf() {
|
||||
uint32_t len = 4;
|
||||
float Val[] = {0, -0.5, 0.9, -0.2};
|
||||
float iPtr[] = {0, 0, 0, 0};
|
||||
float frac[] = {0, -0.5, 0.9, -0.2};
|
||||
float Out[] = {1, 1, 1, 1};
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (nextafterf(Val[i], 1) - Val[i] > 0.0001) {
|
||||
return false;
|
||||
@@ -161,9 +158,6 @@ __device__ bool check_nextafterf() {
|
||||
__device__ bool check_nextafter() {
|
||||
uint32_t len = 4;
|
||||
double Val[] = {0, -0.5, 0.9, -0.2};
|
||||
double iPtr[] = {0, 0, 0, 0};
|
||||
double frac[] = {0, -0.5, 0.9, -0.2};
|
||||
double Out[] = {1, 1, 1, 1};
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (nextafter(Val[i], 1) - Val[i] > 0.0001) {
|
||||
return false;
|
||||
|
||||
@@ -144,8 +144,6 @@ void __half2Test(bool* result, __half2 a) {
|
||||
// Dot Functions
|
||||
result[0] &= amd_mixed_dot(a, a, 1, 1) && result[0];
|
||||
|
||||
half X = a.x;
|
||||
half Y = a.y;
|
||||
}
|
||||
|
||||
TEST_CASE("Unit_hipTestNativeHalf") {
|
||||
|
||||
@@ -21,6 +21,7 @@ THE SOFTWARE.
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_kernels.hh>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#define SIZE (1024 * 1024)
|
||||
static size_t Nbytes = SIZE * sizeof(int);
|
||||
|
||||
|
||||
@@ -21,6 +21,9 @@ THE SOFTWARE.
|
||||
#include <hip_test_checkers.hh>
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
unsigned threadsPerBlock = 256;
|
||||
|
||||
template <unsigned batch, typename T>
|
||||
|
||||
@@ -22,6 +22,8 @@ THE SOFTWARE.
|
||||
#include <hip_test_common.hh>
|
||||
#include <hip_test_defgroups.hh>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
__global__ void Empty(int param) {}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,6 +23,9 @@ THE SOFTWARE.
|
||||
#include <hip_test_defgroups.hh>
|
||||
#include <hip/math_functions.h>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#pragma clang diagnostic ignored "-Wuninitialized"
|
||||
|
||||
// Simple tests for variable type qualifiers:
|
||||
__device__ int deviceVar;
|
||||
|
||||
@@ -62,7 +65,6 @@ __global__ void vectorADD(T __restrict__* A_d, T* B_d, T* C_d, size_t N) {
|
||||
int a = __shfl_up(x, 1);
|
||||
#endif
|
||||
float x = 1.0;
|
||||
float z = sin(x);
|
||||
#ifdef NOT_YET
|
||||
float fastZ = __sin(x);
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,11 @@ THE SOFTWARE.
|
||||
#include <hip_test_defgroups.hh>
|
||||
#include <cstdint>
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#pragma clang diagnostic ignored "-Wunused-result"
|
||||
#pragma clang diagnostic ignored "-Wuninitialized"
|
||||
|
||||
// Memory alignment is broken
|
||||
// Update: with latest changes the aligment is working fine, hence enabled
|
||||
#define ENABLE_ALIGNMENT_TEST_SMALL_BAR 1
|
||||
|
||||
@@ -26,8 +26,7 @@ add_custom_target(copyRtcHeaders ALL
|
||||
if(UNIX)
|
||||
set(AMD_TEST_SRC ${TEST_SRC}
|
||||
RtcFunctions.cpp
|
||||
RtcUtility.cpp
|
||||
hiprtcComplrOptnTesting.cc)
|
||||
RtcUtility.cpp)
|
||||
endif()
|
||||
|
||||
if(HIP_PLATFORM MATCHES "nvidia")
|
||||
|
||||
@@ -36,6 +36,9 @@ validation. For PASS senario the function returns 1 or 0 otherwise.
|
||||
#include <hip_test_common.hh>
|
||||
#include "headers/printf_common.h"
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-parameter"
|
||||
#pragma clang diagnostic ignored "-Wunused-variable"
|
||||
|
||||
bool check_architecture(const char** Combination_CO,
|
||||
int Combination_CO_size, int max_thread_pos,
|
||||
int fast_math_present) {
|
||||
@@ -305,7 +308,6 @@ bool check_denormals_enabled(const char** Combination_CO,
|
||||
for (auto& indx : double_vec_expected) {
|
||||
Expected_Results_int.push_back(static_cast<int>(indx));
|
||||
}
|
||||
int pass_count = 0;
|
||||
int test_case, res_inc;
|
||||
for (test_case = 0, res_inc = 0; test_case < Input_Vals_int.size() &&
|
||||
res_inc < Expected_Results_int.size(); test_case+=2, res_inc++) {
|
||||
@@ -378,8 +380,8 @@ bool check_denormals_enabled(const char** Combination_CO,
|
||||
hipFunction_t function;
|
||||
HIP_CHECK(hipModuleLoadData(&module, codec.data()));
|
||||
HIP_CHECK(hipModuleGetFunction(&function, module, kername));
|
||||
hipError_t status = hipModuleLaunchKernel(function, 1, 1, 1, 1, 1, 1, 0, 0,
|
||||
nullptr, kernel_parameter);
|
||||
HIP_CHECK(hipModuleLaunchKernel(function, 1, 1, 1, 1, 1, 1, 0, 0,
|
||||
nullptr, kernel_parameter));
|
||||
HIP_CHECK(hipMemcpy(result_h, result_d, sizeof(double),
|
||||
hipMemcpyDeviceToHost));
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
@@ -427,7 +429,6 @@ bool check_denormals_disabled(const char** Combination_CO,
|
||||
"Expected_Results_for_no", block_name);
|
||||
const char* kername = kernel_name.c_str();
|
||||
const char* compiler_option = retrieved_CO.c_str();
|
||||
int CO_size = 1;
|
||||
std::vector<double> double_vec_input;
|
||||
for (auto& indx : Input_Vals) {
|
||||
double_vec_input.push_back(indx.get<double>());
|
||||
@@ -444,7 +445,6 @@ bool check_denormals_disabled(const char** Combination_CO,
|
||||
for (auto& indx : double_vec_expected_for_no) {
|
||||
Expected_Results_for_no_int.push_back(static_cast<int>(indx));
|
||||
}
|
||||
int pass_count = 0;
|
||||
int test_case, res_inc;
|
||||
for (test_case = 0, res_inc = 0; test_case < Input_Vals_int.size() &&
|
||||
res_inc < Expected_Results_for_no_int.size(); test_case+=2, res_inc++) {
|
||||
@@ -517,8 +517,8 @@ bool check_denormals_disabled(const char** Combination_CO,
|
||||
hipFunction_t function;
|
||||
HIP_CHECK(hipModuleLoadData(&module, codec.data()));
|
||||
HIP_CHECK(hipModuleGetFunction(&function, module, kername));
|
||||
hipError_t status = hipModuleLaunchKernel(function, 1, 1, 1, 1, 1, 1, 0, 0,
|
||||
nullptr, kernel_parameter);
|
||||
HIP_CHECK(hipModuleLaunchKernel(function, 1, 1, 1, 1, 1, 1, 0, 0,
|
||||
nullptr, kernel_parameter));
|
||||
HIP_CHECK(hipMemcpy(result_h, result_d, sizeof(double),
|
||||
hipMemcpyDeviceToHost));
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
@@ -566,7 +566,7 @@ bool check_ffp_contract_off(const char** Combination_CO,
|
||||
for (auto& indx : retrieved_CO) {
|
||||
CO_vec.push_back(indx.get<std::string>());
|
||||
}
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
std::string hold = CO_vec[0];
|
||||
CO_IRadded[0] = hold.c_str();
|
||||
@@ -626,7 +626,7 @@ bool check_ffp_contract_on(const char** Combination_CO,
|
||||
for (auto& indx : retrieved_CO) {
|
||||
CO_vec.push_back(indx.get<std::string>());
|
||||
}
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
std::string hold = CO_vec[1];
|
||||
CO_IRadded[0] = hold.c_str();
|
||||
@@ -700,7 +700,7 @@ bool check_ffp_contract_fast(const char** Combination_CO,
|
||||
for (auto& indx : retrieved_CO) {
|
||||
CO_vec.push_back(indx.get<std::string>());
|
||||
}
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
std::string hold = CO_vec[2];
|
||||
CO_IRadded[0] = hold.c_str();
|
||||
@@ -769,7 +769,7 @@ bool check_fast_math_enabled(const char** Combination_CO,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
CO_IRadded[0] = retrieved_CO.c_str();
|
||||
CO_IRadded[1] = "-mllvm";
|
||||
@@ -821,7 +821,7 @@ bool check_fast_math_disabled(const char** Combination_CO,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
CO_IRadded[0] = retrieved_CO.c_str();
|
||||
CO_IRadded[1] = "-mllvm";
|
||||
@@ -873,13 +873,13 @@ bool check_slp_vectorize_enabled(const char** Combination_CO,
|
||||
}
|
||||
std::string kernel_name = get_string_parameters("kernel_name", block_name);
|
||||
const char* kername = kernel_name.c_str();
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
CO_IRadded[0] = retrieved_CO.c_str();
|
||||
CO_IRadded[1] = "-mllvm";
|
||||
CO_IRadded[2] = "-print-after=constmerge";
|
||||
__half2 *a_d, *x_d, *y_d;
|
||||
__half2 a_h, x_h, *y_h;
|
||||
__half2 a_h, x_h;
|
||||
a_h.data.x = 1.5;
|
||||
x_h.data.y = 3.0;
|
||||
CaptureStream capture(stderr);
|
||||
@@ -1035,13 +1035,13 @@ bool check_slp_vectorize_disabled(const char** Combination_CO,
|
||||
}
|
||||
std::string kernel_name = get_string_parameters("kernel_name", block_name);
|
||||
const char* kername = kernel_name.c_str();
|
||||
int CO_IRadded_size = 3, a = 0;
|
||||
int CO_IRadded_size = 3;
|
||||
const char** CO_IRadded = new const char*[3];
|
||||
CO_IRadded[0] = retrieved_CO.c_str();
|
||||
CO_IRadded[1] = "-mllvm";
|
||||
CO_IRadded[2] = "-print-after=constmerge";
|
||||
__half2 *a_d, *x_d, *y_d;
|
||||
__half2 a_h, x_h, *y_h;
|
||||
__half2 a_h, x_h;
|
||||
a_h.data.x = 1.5;
|
||||
x_h.data.y = 3.0;
|
||||
CaptureStream capture(stderr);
|
||||
@@ -1451,7 +1451,6 @@ bool check_header_dir(const char** Combination_CO,
|
||||
var_hdr_lst[i] = Headers_list[i];
|
||||
hder_lst[i] = var_hdr_lst[i].c_str();
|
||||
}
|
||||
int pass_count = 0;
|
||||
for (int senario = 0; senario< Input_Thrd_Vals_int.size(); senario++) {
|
||||
hiprtcProgram prog;
|
||||
HIPRTC_CHECK(hiprtcCreateProgram(&prog, header_dir_string,
|
||||
|
||||
@@ -61,6 +61,8 @@ parameters of the respective block name.
|
||||
#include <hip_test_common.hh>
|
||||
#include "headers/printf_common.h"
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
||||
std::vector<std::string> get_combi_string_vec() {
|
||||
picojson::array combi_string = get_array_parameters("Combi_CO",
|
||||
"all_compier_options");
|
||||
@@ -91,7 +93,6 @@ int split_comb_string(std::string option) {
|
||||
int calling_combination_function(std::vector<std::string> combi_vec_list) {
|
||||
int combi_size = combi_vec_list.size();
|
||||
int fast_math_present = -1, undef_present = 0;
|
||||
int a = 0;
|
||||
int max_thread_position;
|
||||
std::string hold_CO[combi_size];
|
||||
const char** Combination_CO = new const char*[combi_size];
|
||||
|
||||
@@ -34,6 +34,8 @@ THE SOFTWARE.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#pragma clang diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
||||
#if defined(_WIN32)
|
||||
class CaptureStream {
|
||||
private:
|
||||
@@ -153,7 +155,8 @@ struct CaptureStream {
|
||||
|
||||
// Truncate the file up to size if we don't want too long log
|
||||
void Truncate(size_t size) {
|
||||
struct stat sb = { 0 };
|
||||
struct stat sb;
|
||||
memset(&sb, 0, sizeof(sb));
|
||||
if (::stat(tempname, &sb) == -1) {
|
||||
std::cout << "failed lstat " << tempname;
|
||||
std::cout << "with error: " << ::strerror(errno) << std::endl;
|
||||
|
||||
@@ -110,13 +110,13 @@ TEST_CASE("Unit_hiprtc_includepath") {
|
||||
void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &args, HIP_LAUNCH_PARAM_BUFFER_SIZE, &size,
|
||||
HIP_LAUNCH_PARAM_END};
|
||||
|
||||
hipModuleLaunchKernel(kernel, NUM_BLOCKS, 1, 1, NUM_THREADS, 1, 1, 0, nullptr, nullptr, config);
|
||||
HIP_CHECK(hipModuleLaunchKernel(kernel, NUM_BLOCKS, 1, 1, NUM_THREADS, 1, 1, 0, nullptr, nullptr, config));
|
||||
|
||||
HIP_CHECK(hipMemcpy(hOut.get(), dOut, bufferSize, hipMemcpyDeviceToHost));
|
||||
|
||||
hipFree(dX);
|
||||
hipFree(dY);
|
||||
hipFree(dOut);
|
||||
HIP_CHECK(hipFree(dX));
|
||||
HIP_CHECK(hipFree(dY));
|
||||
HIP_CHECK(hipFree(dOut));
|
||||
|
||||
HIP_CHECK(hipModuleUnload(module));
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class TextureObjectTestWrapper {
|
||||
}
|
||||
|
||||
channel_desc = hipCreateChannelDesc(32, 0, 0, 0, hipChannelFormatKindFloat);
|
||||
hipMallocArray(&array_member, &channel_desc, width);
|
||||
HIP_CHECK(hipMallocArray(&array_member, &channel_desc, width));
|
||||
|
||||
HIP_CHECK(
|
||||
hipMemcpy2DToArray(array_member, 0, 0, host_data_, size, size, 1, hipMemcpyHostToDevice));
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle