Skip to content

Commit 5dffccf

Browse files
committed
testing
1 parent e2693f6 commit 5dffccf

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ The following libraries have been ported and should work on any platform:
3636
## Applications
3737

3838
chipStar has so far been tested using the following applications:
39-
- [libCEED]()
40-
- [GAMESS]
41-
- [HcBench]
42-
- TODO
39+
- [libCEED](https://github.com/CHIP-SPV/libCEED) Our fork includes some workarounds.
40+
- [GAMESS](https://www.msg.chem.iastate.edu/gamess/) Source code is not public.
41+
- [HcBench](https://github.com/zjin-lcf/HeCBench) CUDA Benchmarks.
4342

4443
## Getting Started
4544

scripts/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ def run_tests(num_tries):
170170
if "0 tests failed" in res:
171171
exit(0)
172172
else:
173-
exit(1)
173+
exit(1)

src/backend/OpenCL/CHIPBackendOpenCL.cc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,7 @@ bool CHIPEventOpenCL::wait() {
753753
}
754754

755755
bool CHIPEventOpenCL::updateFinishStatus(bool ThrowErrorIfNotReady) {
756+
logTrace("CHIPEventOpenCL::updateFinishStatus()");
756757
if (ThrowErrorIfNotReady && this->ClEvent == nullptr)
757758
CHIPERR_LOG_AND_THROW("OpenCL has not been initialized cl_event is null",
758759
hipErrorNotReady);
@@ -1088,6 +1089,7 @@ struct HipStreamCallbackData {
10881089
void *UserData;
10891090
hipStreamCallback_t Callback;
10901091
std::shared_ptr<chipstar::Event> CallbackFinishEvent;
1092+
std::shared_ptr<chipstar::Event> CallbackCompleted;
10911093
};
10921094

10931095
void CL_CALLBACK pfn_notify(cl_event Event, cl_int CommandExecStatus,
@@ -1105,7 +1107,7 @@ void CL_CALLBACK pfn_notify(cl_event Event, cl_int CommandExecStatus,
11051107
CL_COMPLETE);
11061108
CHIPERR_CHECK_LOG_AND_THROW_TABLE(clSetUserEventStatus);
11071109
}
1108-
// delete Cbo;
1110+
delete Cbo;
11091111
}
11101112

11111113
void CHIPQueueOpenCL::MemMap(const chipstar::AllocationInfo *AllocInfo,
@@ -1219,10 +1221,10 @@ void CHIPQueueOpenCL::addCallback(hipStreamCallback_t Callback,
12191221
// finishing the user CB's execution.
12201222

12211223
HipStreamCallbackData *Cb = new HipStreamCallbackData{
1222-
this, hipSuccess, UserData, Callback, CallbackEvent};
1224+
this, hipSuccess, UserData, Callback, CallbackEvent, nullptr};
12231225

12241226
std::vector<std::shared_ptr<chipstar::Event>> WaitForEventsCBB{CallbackEvent};
1225-
auto CallbackCompleted = enqueueBarrier(WaitForEventsCBB);
1227+
Cb->CallbackCompleted = enqueueBarrier(WaitForEventsCBB);
12261228

12271229
// We know that the callback won't be yet launched since it's depending
12281230
// on the barrier which waits for the user event.
@@ -1232,7 +1234,7 @@ void CHIPQueueOpenCL::addCallback(hipStreamCallback_t Callback,
12321234
CL_COMPLETE, pfn_notify, Cb);
12331235
CHIPERR_CHECK_LOG_AND_THROW_TABLE(clSetEventCallback);
12341236

1235-
updateLastEvent(CallbackCompleted);
1237+
updateLastEvent(Cb->CallbackCompleted);
12361238

12371239
// Now the CB can start executing in the background:
12381240
clSetUserEventStatus(
@@ -1241,7 +1243,7 @@ void CHIPQueueOpenCL::addCallback(hipStreamCallback_t Callback,
12411243
CHIPERR_CHECK_LOG_AND_THROW_TABLE(clSetUserEventStatus);
12421244

12431245
return;
1244-
};
1246+
}
12451247

12461248
std::shared_ptr<chipstar::Event> CHIPQueueOpenCL::enqueueMarkerImpl() {
12471249
std::shared_ptr<chipstar::Event> MarkerEvent =
@@ -1409,8 +1411,7 @@ CHIPQueueOpenCL::~CHIPQueueOpenCL() {
14091411
logTrace("~CHIPQueueOpenCL() {}", (void *)this);
14101412
}
14111413

1412-
std::shared_ptr<chipstar::Event>
1413-
CHIPQueueOpenCL::memCopyAsyncImpl(void *Dst, const void *Src, size_t Size,
1414+
std::shared_ptr<chipstar::Event> CHIPQueueOpenCL::memCopyAsyncImpl(void *Dst, const void *Src, size_t Size,
14141415
hipMemcpyKind Kind) {
14151416
std::shared_ptr<chipstar::Event> Event =
14161417
static_cast<CHIPBackendOpenCL *>(Backend)->createEventShared(

0 commit comments

Comments
 (0)