Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm: ability to specify target cpu and features #90

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

steve-numeus
Copy link
Contributor

To an extent, this addresses issues #27 and #12.

model = lleaves.Model(model_file=model_str_filename)
model.compile(
    cache=lleaves_cache_filename,
    target_cpu='',                                   # do not target a specific arch type
    target_cpu_features='+64bit,+avx,+avx2,+sse4.1', # enable these flags
)

per create_target_machine, this will create a compilation target which does not target a specific cpu, and enables avx, avx2 and sse4.1 instruction sets

@siboehm
Copy link
Owner

siboehm commented Dec 3, 2024

This is good stuff, thanks! Happy to merge if the tests pass, I'll try to do another release once it goes in

@siboehm siboehm self-requested a review December 3, 2024 16:38
@siboehm siboehm enabled auto-merge December 3, 2024 17:42
siboehm
siboehm approved these changes Dec 3, 2024
@siboehm siboehm merged commit 4251480 into siboehm:master Dec 3, 2024
3 checks passed
@steve-numeus
Copy link
Contributor Author

Thanks for merging Simon!

Does this mean it's automatically available in pypi as a new release or does that have to happen separately?

@siboehm
Copy link
Owner

siboehm commented Dec 4, 2024

No not yet, I need to make a new release for that to happen. I'll try to do it over the next few days

@siboehm
Copy link
Owner

siboehm commented Dec 4, 2024

actually I just gave it a shot, either there'll be a new release on PyPI in 30min or I'll try again later

@steve-numeus
Copy link
Contributor Author

thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants