Hi, I'm unsure how to implement the ops::Div division operator
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 536
- Avg merge
- 12h 12m
- Merged PRs (30d)
- 4
Description
Hi, I've spent some time reading the code,
In this project, there is no direct implementation towards the division operator.
But I found there is a similar CPU implementation in src/cpu/kernels.cc
template <CpuIsa ISA, typename T>
void rcp(const T* x, T* y, dim_t size) {
vectorized_unary_transform<ISA>(x, y, size, Vec<T, ISA>::rcp);
}
which is defined in src/cpu/vec.h:
static inline value_type rcp(value_type a) {
return static_cast<T>(1) / a;
}
However, I can not find any similar implementation for GPU operation. Did I miss anything? Or, if there's no such implementation in the GPU, what's the recommended way to produce it?
Sincerely,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the CPU reciprocal implementation in src/cpu/kernels.cc and src/cpu/vec.h with the project's GPU kernel sources, which are not identified in the issue. Determine where ops::Div is expected to be handled and what GPU backends must support it; done requires a confirmed implementation path or documented recommendation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100