Relation between at::Half and __half
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
The question concerns the CUDA atomic max helper in the pytorch_scatter atomics.cuh pattern, which the issue quotes, and how at::Half relates to the __half type. Start by reading how the extension's CUDA sources are compiled and where the at::Half operator is defined. Done would mean a working atomicMax overload for half inputs that passes a test exercising the CUDA kernel, but the issue asks a design question and has no comments or linked work.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi, we want to create atomicMax function with __half inputs by following pytorch_scatter/atomics.cuh at master. The detailed codes are
inline __device__ void operator()(at::Half *address, at::Half val) { \
unsigned int *address_as_ui = \
(unsigned int *)((char *)address - ((size_t)address & 2)); \
unsigned int old = *address_as_ui; \
unsigned int assumed; \
\
do { \
assumed = old; \
at::Half hsum; \
hsum.x = (size_t)address & 2 ? (old >> 16) : (old & 0xffff); \
hsum = OP(hsum, val); \
old = (size_t)address & 2 ? (old & 0xffff) | (hsum.x << 16) \
: (old & 0xffff0000) | hsum.x; \
old = atomicCAS(address_as_ui, assumed, old); \
} while (assumed != old); \
} \
When it comes to the __half type, however, we do not how to obtain the hsum.x. Are there some ways to convert as::Half and __half each other?
Also, how could we implement OP as max to deal with __half inputs?
Thanks : )
- Ngôn ngữ chính
- Python
- Star
- 1.2k
- Fork
- 250
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pytorch/extension-cpp
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
pytorch/extension-cpp#100 · 5 bình luận ·
-
Deprecation warningĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
pytorch/extension-cpp#82 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
pytorch/extension-cpp#124 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
pytorch/extension-cpp#123 ·
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 12/100
pytorch/extension-cpp#121 · 3 bình luận ·
Tất cả issue của pytorch/extension-cpp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
hermes hooks doctor smoke test never checks the hook exit code — a crashing hook (exit=1) renders ✓ "ran clean" and "All shell hooks look healthy"Có thể đã có người làm @cestercian đã nhận hôm nay. Đang mởcomp/cli P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#162259 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[request] gRpc/1.86.0Đang mởupstream update
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
conan-io/conan-center-index#31597 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
AOSSIE-Org/PictoPy#1802 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
community-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA-NeMo/Run#727 ·
Maintainer thường phản hồi trong vòng 1 ngày