[Triton] 벤치마크 실행을 위한 optional dependency 추가
들어가며
Triton Kernels 패키지에서 벤치마크를 실행할 때 llnl-hatchet, matplotlib, pandas 같은 패키지가 필요하지만, 기본 의존성에는 포함되어 있지 않아 수동 설치가 필요했다. 이 PR은 이들을 optional dependency로 선언한다.
핵심 코드 분석
Before
# pyproject.toml
[project]
name = "triton_kernels"
version = "1.0.0"
dependencies = ["numpy", "pytest"]
After
[project]
name = "triton_kernels"
version = "1.0.0"
dependencies = ["numpy", "pytest"]
[project.optional-dependencies]
tests = ["llnl-hatchet", "matplotlib", "pandas"]
Makefile도 업데이트되었다:
# Before
$(PYTHON) -m pip install python/triton_kernels -v
# After
$(PYTHON) -m pip install "python/triton_kernels[tests]" -v
왜 이게 좋은가
- 명시적 의존성: 벤치마크에 필요한 패키지가
[tests]extra로 문서화되었다. - 선택적 설치: 테스트가 필요 없는 환경에서는 추가 패키지를 설치하지 않아도 된다.
정리
+4/-1의 최소 변경이지만, 새로운 기여자가 벤치마크를 원활하게 실행할 수 있게 하는 DX(Developer Experience) 개선이다.
참고 자료
이 글은 AI(Claude)의 도움을 받아 작성되었습니다. 코드 분석 내용은 실제 PR diff를 기반으로 합니다.
댓글