Skip to content
Merged
Changes from 1 commit
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
38 changes: 30 additions & 8 deletions benchmarks/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,33 @@ def run(self):
super().run()


setup(name="triton-kernels-benchmark", packages=[
"triton_kernels_benchmark",
], package_dir={
"triton_kernels_benchmark": "triton_kernels_benchmark",
}, package_data={"triton_kernels_benchmark": ["xetla_kernel.cpython-*.so"]}, cmdclass={
"build_ext": build_ext,
"clean": clean,
}, ext_modules=[CMakeExtension("triton_kernels_benchmark")])
def get_git_commit_hash(length=8):
try:
cmd = ["git", "rev-parse", f"--short={length}", "HEAD"]
return "+git{}".format(subprocess.check_output(cmd).strip().decode("utf-8"))
except Exception:
return ""


def get_install_requires():
install_requires = ["torch", "matplotlib", "pandas", "tabulate"] # yapf: disable
return install_requires


setup(
name="triton-kernels-benchmark",
version="3.1.0" + get_git_commit_hash(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 3.1.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To indicate matching triton version.

packages=["triton_kernels_benchmark"],
install_requires=get_install_requires(),
package_dir={"triton_kernels_benchmark": "triton_kernels_benchmark"},
package_data={"triton_kernels_benchmark": ["xetla_kernel.cpython-*.so"]},
cmdclass={
"build_ext": build_ext,
"clean": clean,
},
ext_modules=[CMakeExtension("triton_kernels_benchmark")],
extra_require={
"ipex": ["numpy<=2.0", "intel-extension-for-pytorch=2.1.10"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we have to use the version defined by the pin here: https://github.com/intel/intel-xpu-backend-for-triton/blob/main/.github/pins/ipex.txt?

"pytorch": ["torch>=2.6"]
},
)
Loading