mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add check for local work group size in clEnqueueNDRangeKernel call.
- Incoming local work group size cannot exceed device capabilities. Change-Id: I89a7503155c71443e3ebc630debb5d5b466c6cb5
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Intel Corporation
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -764,10 +764,10 @@ TEST_P(PerformanceHintEnqueueKernelBadSizeTest, GivenBadLocalWorkGroupSizeWhenEn
|
||||
}
|
||||
|
||||
badSizeDimension = GetParam();
|
||||
if (badSizeDimension == 0) {
|
||||
if (localWorkGroupSize[badSizeDimension] > 1) {
|
||||
localWorkGroupSize[badSizeDimension] /= 2;
|
||||
} else {
|
||||
localWorkGroupSize[badSizeDimension] *= 2;
|
||||
localWorkGroupSize[0] /= 2;
|
||||
}
|
||||
|
||||
retVal = pCmdQ->enqueueKernel(kernel, 3, nullptr, globalWorkGroupSize, localWorkGroupSize, 0, nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user