Skip to content

Commit

Permalink
remove queue submits from cpp files
Browse files Browse the repository at this point in the history
fix CUDA and HIP
  • Loading branch information
jcosborn committed Nov 2, 2023
1 parent 922692d commit 2918ed9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
13 changes: 5 additions & 8 deletions include/targets/cuda/special_ops_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,21 @@ namespace quda {
// SpecialOps
template <typename ...T>
struct SpecialOps : SpecialOps_Base<T...> {
template <typename ...U> constexpr void setSpecialOps(const SpecialOps<U...> &ops) {
template <typename ...U> constexpr void setSpecialOps(const SpecialOps<U...> &) {
static_assert(std::is_same_v<SpecialOps<T...>,SpecialOps<U...>>);
}
};

// op implementations
struct op_blockSync : op_BaseT<void> {
//using dependencies = depFullBlock;
struct op_blockSync {
template <typename ...Arg>
static constexpr unsigned int shared_mem_size(dim3 block, Arg &...arg) { return 0; }
static constexpr unsigned int shared_mem_size(dim3, Arg &...) { return 0; }
};

template <typename T>
struct op_warp_combine : op_BaseT<T> {
//using dependencies = depNone;
//using dependencies = depFullBlock;
struct op_warp_combine {
template <typename ...Arg>
static constexpr unsigned int shared_mem_size(dim3, Arg &...arg) { return 0; }
static constexpr unsigned int shared_mem_size(dim3, Arg &...) { return 0; }
};

}
4 changes: 2 additions & 2 deletions include/targets/hip/special_ops_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace quda {
};

// op implementations
struct op_blockSync : op_BaseT<void> {
struct op_blockSync {
template <typename ...Arg>
static constexpr unsigned int shared_mem_size(dim3, Arg &...) { return 0; }
};

template <typename T>
struct op_warp_combine : op_BaseT<T> {
struct op_warp_combine {
template <typename ...Arg>
static constexpr unsigned int shared_mem_size(dim3, Arg &...) { return 0; }
};
Expand Down
2 changes: 2 additions & 0 deletions lib/targets/sycl/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ namespace quda
argBufD[i] = nullptr;
argBufSizeD[i] = 0;
}
#if 0
printfQuda("Testing submit...");
auto q = streams[Nstream-1];
q.submit([&](sycl::handler& h) {
Expand All @@ -300,6 +301,7 @@ namespace quda
});
});
printfQuda(" done\n");
#endif
}

void destroy()
Expand Down
9 changes: 5 additions & 4 deletions lib/targets/sycl/quda_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,12 @@ namespace quda
auto q = device::get_target_stream(stream);
pe->stream = stream;
pe->eventIdx = device::getEventIdx(stream);
pe->event = q.submit([&](sycl::handler& cgh) {
cgh.single_task<class EventRecord>([=](){});
//cgh.host_task([=](){});
});
//pe->event = q.submit([&](sycl::handler& cgh) {
//cgh.single_task<class EventRecord>([=](){});
//cgh.host_task([=](){});
//});
//*pe = q.submit_barrier();
pe->event = q.ext_oneapi_submit_barrier();
}

//void qudaStreamWaitEvent_(qudaStream_t stream, qudaEvent_t quda_event, unsigned int flags,
Expand Down

0 comments on commit 2918ed9

Please sign in to comment.