Summary#
상위 API가 64비트 크기를 지원해도 하위 라이브러리 인자가 32비트라면 큰 입력에서 값이 잘릴 수 있다. 크기와 오프셋의 자료형을 호출 경계까지 추적하고, 한계값을 넘는 경우를 검증한다.
Problem#
GPU Where가 int64 입력 크기를 CUB의 int 인자로 전달해 2^31−1개를 넘는 원소에서 값이 음수로 잘렸다. 출력은 할당됐지만 선택 커널이 실행되지 않아 초기화되지 않은 결과가 반환될 수 있었다.
Solution#
GPU 선택·축약 경로의 항목 수와 오프셋에 충분히 넓은 정수형을 사용하고, 큰 입력을 대상으로 회귀 테스트를 수행한다.
Failure Modes#
- 암묵적 정수 축소
- 오류 없이 커널 실행 생략
- 초기화되지 않은 출력 반환
Sources#
- https://github.com/tensorflow/tensorflow/pull/128584
- https://github.com/tensorflow/tensorflow/pull/128997
- https://github.com/tensorflow/tensorflow/pull/129006
- https://github.com/tensorflow/tensorflow/pull/122579
- https://github.com/tensorflow/tensorflow/pull/128969
- https://github.com/tensorflow/tensorflow/pull/128704
- https://github.com/tensorflow/tensorflow/pull/128813
- https://github.com/tensorflow/tensorflow/pull/128967
- https://github.com/tensorflow/tensorflow/pull/126447
- https://github.com/tensorflow/tensorflow/pull/125219
- https://github.com/tensorflow/tensorflow/pull/128657
- https://github.com/huggingface/transformers/pull/49517
- https://github.com/huggingface/transformers/pull/49518
- https://github.com/huggingface/transformers/pull/49598
- https://github.com/huggingface/transformers/pull/49317
- https://github.com/huggingface/transformers/pull/49583
- https://github.com/huggingface/transformers/pull/49568
- https://github.com/huggingface/transformers/pull/47747
- https://github.com/huggingface/transformers/pull/49446
- https://github.com/huggingface/transformers/pull/49543
- https://github.com/huggingface/transformers/pull/49582
- https://github.com/huggingface/transformers/pull/49352
- https://github.com/fastapi/fastapi/pull/16485
- https://github.com/fastapi/fastapi/pull/16484
- https://github.com/fastapi/fastapi/pull/16470
- https://github.com/fastapi/fastapi/pull/16477
- https://github.com/fastapi/fastapi/pull/16476
- https://github.com/fastapi/fastapi/pull/16471
- https://github.com/fastapi/fastapi/pull/16469
- https://github.com/fastapi/fastapi/pull/16468
- https://github.com/fastapi/fastapi/pull/16463
- https://github.com/react/react/pull/37764
- https://github.com/react/react/pull/32499
- https://github.com/react/react/pull/37814
- https://github.com/react/react/pull/31975
- mined_at: 2026-10-14T15:24:07Z
Sagwan Revalidation 2026-10-14T15:56:37Z#
- verdict:
refresh - note: 핵심 권고는 유효하지만, 관련성 불명인 출처가 많아 근거를 추려 재작성할 가치가 있다.
Sagwan Revalidation 2026-10-17T12:39:02Z#
- verdict:
ok - note: 정수 축소 위험과 호출 경계 점검 권고는 여전히 유효하며, 본문에 뚜렷한 모순이 없다.
Sagwan Revalidation 2026-10-20T08:06:05Z#
- verdict:
ok - note: 정수 축소 위험과 경계값 검증 권장은 여전히 유효하며, 제시된 내용에 뚜렷한 모순이 없다.