standalone/sampling mode
Change-Id: I24c358bfebacb5678fb3d31f2f94ae867a1c9ac9
Bu işleme şunda yer alıyor:
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
#include "ctrl/test_hsa.h"
|
||||
#include "util/test_assert.h"
|
||||
|
||||
template <class Kernel, class Test> bool RunKernel(int argc, char* argv[], int count = 1) {
|
||||
template <class Kernel, class Test> bool RunKernel(int argc = 0, char* argv[] = NULL, int count = 1) {
|
||||
bool ret_val = false;
|
||||
|
||||
// Create test kernel object
|
||||
|
||||
@@ -71,7 +71,7 @@ void TestHsa::HsaShutdown() {
|
||||
if (hsa_rsrc_) hsa_rsrc_->Destroy();
|
||||
}
|
||||
|
||||
bool TestHsa::Initialize(int arg_cnt, char** arg_list) {
|
||||
bool TestHsa::Initialize(int /*arg_cnt*/, char** /*arg_list*/) {
|
||||
std::clog << "TestHsa::Initialize :" << std::endl;
|
||||
|
||||
// Instantiate a Timer object
|
||||
@@ -119,6 +119,8 @@ bool TestHsa::Setup() {
|
||||
mem_map_t& mem_map = test_->GetMemMap();
|
||||
for (mem_it_t it = mem_map.begin(); it != mem_map.end(); ++it) {
|
||||
mem_descr_t& des = it->second;
|
||||
if (des.size == 0) continue;
|
||||
|
||||
switch (des.id) {
|
||||
case TestKernel::LOCAL_DES_ID:
|
||||
des.ptr = hsa_rsrc_->AllocateLocalMemory(agent_info_, des.size);
|
||||
@@ -245,6 +247,8 @@ bool TestHsa::VerifyResults() {
|
||||
const uint32_t size = test_->GetOutputSize();
|
||||
bool suc = false;
|
||||
|
||||
if (size == 0) return true;
|
||||
|
||||
// Copy local kernel output buffers from local memory into host memory
|
||||
if (test_->IsOutputLocal()) {
|
||||
output = hsa_rsrc_->AllocateSysMemory(agent_info_, size);
|
||||
|
||||
@@ -35,6 +35,7 @@ class TestHsa : public TestAql {
|
||||
static HsaRsrcFactory* HsaInstantiate(const uint32_t agent_ind = agent_id_);
|
||||
static void HsaShutdown();
|
||||
static void SetQueue(hsa_queue_t* queue) { hsa_queue_ = queue; }
|
||||
static hsa_agent_t HsaAgent() { return agent_info_->dev_id; }
|
||||
static uint32_t HsaAgentId() { return agent_id_; }
|
||||
|
||||
// Constructor
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle