Skip to content

Commit

Permalink
CM EMU: multithread runtime and barriers implementation: initial cont…
Browse files Browse the repository at this point in the history
…ribution.

Issue: VMIT-6799
Resolves: VMIT-6799
Co-Authored-By: Satanovskiy Leonid <leonid.satanovkiy@intel.com>
for
- Build fixes (work under 3Dbuilder and local script + 32bits build fixed)
- Workable 32bits mode, generalized kernel launcher to reuse in single thread mode.
- Misc fixes.
Change-Id: I7d3638f38e22e2a0b0f7d389aa9e5fc045c67b17
  • Loading branch information
2 people authored and intel-mediadev committed Oct 17, 2019
1 parent 4f1b231 commit 0e55ffe
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmrtlib/agnostic/hardware/cm_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,8 @@ CM_RT_API int32_t CmQueue_RT::DestroyEventFast(CmEvent *&event)
return CM_SUCCESS;
}

CM_RT_API int32_t CmQueue_RT::SetResidentGroupAndParallelThreadNum(uint32_t residentGroupNum, uint32_t parallelThreadNum)
{
return CM_NOT_IMPLEMENTED;
}

2 changes: 2 additions & 0 deletions cmrtlib/agnostic/hardware/cm_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ class CmQueue_RT : public CmQueue
CmEvent *&event,
const CmThreadGroupSpace *threadGroupSpace = nullptr);

CM_RT_API int32_t SetResidentGroupAndParallelThreadNum(uint32_t residentGroupNum, uint32_t parallelThreadNum);

CM_QUEUE_CREATE_OPTION GetQueueOption();

protected:
Expand Down
12 changes: 12 additions & 0 deletions cmrtlib/agnostic/share/cm_queue_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,18 @@ class CmQueue
CmEvent *&event,
const CmThreadGroupSpace *threadGroupSpace = nullptr) = 0;

//!
//! \brief [Only In Emu Mode] set the resident group number and parallel thread number
//! \details
//! \param [in] residentGroupNum
//! number of resident groups running on device
//! \param [in] parallelThreadNum
//! number of threads run in parallel
//! \retval CM_SUCCESS if the parameter is successfully set.
//! \retval CM_NOT_IMPLEMENTED if in sim or emu mode
//!
CM_RT_API virtual int32_t SetResidentGroupAndParallelThreadNum(uint32_t residentGroupNum, uint32_t parallelThreadNum) = 0;

protected:
virtual ~CmQueue() = default;
};
Expand Down
2 changes: 2 additions & 0 deletions cmrtlib/agnostic/share/cm_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,8 @@ class CmQueue
CM_RT_API virtual INT EnqueueWithGroupFast(CmTask *task,
CmEvent *&event,
const CmThreadGroupSpace *threadGroupSpace = nullptr) = 0;

CM_RT_API virtual INT SetResidentGroupAndParallelThreadNum(uint32_t residentGroupNum, uint32_t parallelThreadNum) = 0;
protected:
~CmQueue(){};
};
Expand Down

0 comments on commit 0e55ffe

Please sign in to comment.