Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pytorch3d/csrc/pulsar/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ IHD float3 outer_product_sum(const float3& a) {
}

// TODO: put intrinsics here.
// On ROCm/HIP, float3 is HIP_vector_type<float, 3> which already provides
// all arithmetic and compound-assignment operators as member functions.
// Defining them here too causes "ambiguous overload" errors. Skip for ROCm.
#if !defined(USE_ROCM)
IHD float3 operator+(const float3& a, const float3& b) {
return make_float3(a.x + b.x, a.y + b.y, a.z + b.z);
Expand Down Expand Up @@ -94,7 +97,7 @@ IHD float3 operator*(const float3& a, const float3& b) {
IHD float3 operator*(const float& a, const float3& b) {
return b * a;
}
#endif //! USE_ROCM
#endif // !USE_ROCM

INLINE DEVICE float length(const float3& v) {
// TODO: benchmark what's faster.
Expand Down