P4 to Git Change 1150348 by rayxiao@alit_opencl_rayxiao on 2015/05/13 10:49:22

EPR #396242 - Solution to cpu device alignment bug.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/edg/src/amd_ocl_attribute.c#24 edit
... //depot/stg/opencl/drivers/opencl/compiler/edg/src/cmd_line.c#86 edit
... //depot/stg/opencl/drivers/opencl/compiler/edg/src/il.c#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpucommand.cpp#64 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpucommand.hpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpukernel.hpp#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpumapping.cpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpumapping.hpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.hpp#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#231 edit
... //depot/stg/opencl/drivers/opencl/tools/runocl/options.c#11 edit
このコミットが含まれているのは:
foreman
2015-05-13 12:01:50 -04:00
コミット 70aabc5325
6個のファイルの変更、462行の追加、10行の削除
+35 -1
ファイルの表示
@@ -9,6 +9,8 @@
#include "device/device.hpp"
#include <amdocl/cl_kernel.h>
#include "device/cpu/cpumapping.hpp"
//! \namespace cpu CPU Device Implementation
namespace cpu {
@@ -18,7 +20,9 @@ class Kernel : public device::Kernel
private:
const void* entryPoint_; //!< entry for the kernel
std::vector< std::pair<size_t, size_t> > args_;
std::vector< std::pair<size_t, size_t> > args_;
std::vector< std::pair < HCtoDCmap, size_t> > HCtoDCmaps_;
std::vector< HCtoDCmap > internal_maps_;
public:
uint nature_; //!< kernel's nature
uint privateSize_; //!< WorkItem's private memory size (in bytes)
@@ -42,6 +46,36 @@ public:
return args_[argIndex].second;
}
void addInternalMap(HCtoDCmap *new_map) {
if (new_map != NULL) {
internal_maps_.push_back(*new_map);
this->addInternalMap(new_map->internal_field_map);
this->addInternalMap(new_map->next_field_map);
}
else
return;
}
void addHCtoDCmap(HCtoDCmap *new_map) {
if (new_map != NULL) {
if (HCtoDCmaps_.size() > 0)
HCtoDCmaps_.push_back(std::pair< HCtoDCmap, size_t >(*new_map, HCtoDCmaps_.back().second));
else
HCtoDCmaps_.push_back(std::pair< HCtoDCmap, size_t >(*new_map, 0));
}
else
return;
}
HCtoDCmap getHCtoDCmap(int mapIndex) const {
return HCtoDCmaps_[mapIndex].first;
}
uint getArgNumber() {
return HCtoDCmaps_.size();
}
//! Default constructor
Kernel(const std::string& name)
: device::Kernel(name), entryPoint_(NULL), nature_(0),