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

chore: add support for building on jetson device #620

Merged
merged 6 commits into from
Oct 24, 2023

Conversation

yusiwen
Copy link
Contributor

@yusiwen yusiwen commented Oct 23, 2023

The current building flow will fail on Jetson, because the CTranslate2 binding turns the "sse4.1" flag on while it's not available on Jetson.

I've added a function to check whether it's building on the NVIDIA Jetson device or not. If true, it will turn on CUDA and CUDNN flags of CTranslate2.

I've tested building on Intel CPU, AMD CPU, Jetson Orin Nano, Jetson Orin AGX.

crates/ctranslate2-bindings/build.rs Outdated Show resolved Hide resolved
@yusiwen yusiwen changed the title add support for building on jetson device chore: add support for building on jetson device Oct 24, 2023
crates/ctranslate2-bindings/build.rs Outdated Show resolved Hide resolved
crates/ctranslate2-bindings/build.rs Outdated Show resolved Hide resolved
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

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

LGTM and running CIs

@yusiwen
Copy link
Contributor Author

yusiwen commented Oct 24, 2023

LGTM and running CIs

Oops, seems that there is a lint problem. I'm pretty new to Rust, where should I look at?

@wsxiaoys
Copy link
Member

You could run cargo +nightly fmt to fix the lint

@yusiwen
Copy link
Contributor Author

yusiwen commented Oct 24, 2023

Ok, I'm digging into it.

@yusiwen
Copy link
Contributor Author

yusiwen commented Oct 24, 2023

@wsxiaoys Wierd, My cargo +nightly fmt --check shows everything is fine. Do I miss something?

@wsxiaoys
Copy link
Member

wsxiaoys commented Oct 24, 2023

You might also fix the fmt based on information here: https://github.com/TabbyML/tabby/actions/runs/6623245595/job/17990064469?pr=620

@yusiwen
Copy link
Contributor Author

yusiwen commented Oct 24, 2023

@wsxiaoys I've pushed the result of cargo fmt. The CI log doesn't show much of information about why it complains my code. How about this version?

@wsxiaoys
Copy link
Member

@wsxiaoys I've pushed the result of cargo fmt. The CI log doesn't show much of information about why it complains my code. How about this version?

image

This is screenshot from link https://github.com/TabbyML/tabby/actions/runs/6623245595/job/17990064469?pr=620

@yusiwen
Copy link
Contributor Author

yusiwen commented Oct 24, 2023

@wsxiaoys Yes, I've studied that log, cannot find any information why the code failed to lint. The error just shows "Process completed with exit code 1." at somewhere around line 42.

And, this time, it does not complain anymore after I format the code at line 47. weird.

@wsxiaoys wsxiaoys enabled auto-merge (squash) October 24, 2023 07:09
@wsxiaoys wsxiaoys merged commit 44cac0b into TabbyML:main Oct 24, 2023
@yusiwen yusiwen deleted the jetson branch October 24, 2023 07:31
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