diff options
author | jkalamat <john.kalamatianos@amd.com> | 2016-06-09 11:24:55 -0400 |
---|---|---|
committer | jkalamat <john.kalamatianos@amd.com> | 2016-06-09 11:24:55 -0400 |
commit | 3724fb15faafaaca54cc7a500df9c1490a387049 (patch) | |
tree | bbd671b68ba971087a1cd45b208947c09a622d38 /src/arch/hsail/gen.py | |
parent | e5b7b6780f9748b6f13ef91e3e22d53ebdf47968 (diff) | |
download | gem5-3724fb15faafaaca54cc7a500df9c1490a387049.tar.xz |
gpu-compute: parametrize Wavefront size
Eliminate the VSZ constant that defined the Wavefront size (in numbers of work
items); replaced it with a parameter in the GPU.py configuration script.
Changed all data structures dependent on the Wavefront size to be dynamically
sized. Legal values of Wavefront size are 16, 32, 64 for now and checked at
initialization time.
Diffstat (limited to 'src/arch/hsail/gen.py')
-rwxr-xr-x | src/arch/hsail/gen.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/hsail/gen.py b/src/arch/hsail/gen.py index bb369fd10..f77680541 100755 --- a/src/arch/hsail/gen.py +++ b/src/arch/hsail/gen.py @@ -235,7 +235,7 @@ $class_name::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { DestCType dest_val = $expr; this->dest.set(w, lane, dest_val); @@ -256,7 +256,7 @@ $class_name::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { SrcCType src_val0 = this->src0.get<SrcCType>(w, lane); DestCType dest_val = $expr; @@ -277,7 +277,7 @@ $class_name<DataType>::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { CType dest_val; if ($dest_is_src_flag) { @@ -312,7 +312,7 @@ $class_name<DataType>::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { CType dest_val; @@ -346,7 +346,7 @@ $class_name<DataType>::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { DestT dest_val; if ($dest_is_src_flag) { @@ -372,7 +372,7 @@ $class_name<DataType>::execute(GPUDynInstPtr gpuDynInst) Wavefront *w = gpuDynInst->wavefront(); const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { CType dest_val; @@ -401,7 +401,7 @@ $class_name<DestDataType, SrcDataType>::execute(GPUDynInstPtr gpuDynInst) const VectorMask &mask = w->get_pred(); - for (int lane = 0; lane < VSZ; ++lane) { + for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) { if (mask[lane]) { DestCType dest_val; SrcCType src_val[$num_srcs]; |