Repository navigation
fix(xla): clear the clippy finding in xla_worker_tests - #2991
Merged
Merged
Conversation
`cargo clippy --features cuda,xla-iree --all-targets -- -D warnings` stops at `field_reassign_with_default` in `a_budget_wider_than_the_shape_is_clamped_instead_of_refused` (lablup#2848). The module is compiled only with `xla-iree`, and CI lints the default feature set, so nothing reported it. It is the only finding on the three OpenXLA feature sets (`cuda,xla-iree`, `xla-diagnostics`, `cuda,xla-reference-diagnostics`). With it gone clippy passes on all three.
Main independently adopted a struct initializer for this test. Retain the explicit ServerConfig default spelling while integrating the current base so the original PR can merge cleanly. Validated the changed Rust file with rustfmt; the equivalent initializer is included in the CUDA integration build. Refs lablup#2991
Member
|
Implementation hardening for PR #2991. The current base independently fixed the same clippy finding. Merged main and resolved the single conflict by retaining the explicit ServerConfig default initializer (79bfe84). Security review found no new credential, injection or untrusted execution path. Performance review found no hot-path behavior change. Hosted checks must pass on the updated head before merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo clippy --features cuda,xla-iree --all-targets -- -D warningsstops at one finding,field_reassign_with_defaultinsrc/server/batch/xla_worker_tests.rs. That module is compiled only withxla-iree, which theclippyjob does not enable, so nothing reported it. This writes the two statements as one struct literal. With it clippy passes on the three OpenXLA feature sets.Related issues
No issue filed; the report is this description. The two lines came in with #2848.
Type of change
fix— bug fix (a lint failure in test code; no behavior changes)Before / after
cargo clippy --locked --keep-going <features> --all-targets -- -D warningson a DGX Spark (GB10). The three-feature baseline survey ran at local commit62b6010c7:ce6855bc8plus the unrelated CUDA cache-default test isolation (onlynative_env_tests.rsand its new integration test differ). The affectedxla_worker_tests.rsblob is identical to cleance6855bc8. The fix is independently based once6855bc8; the 19-test before/after comparison below starts from cleance6855bc8.62b6010c7)--features cuda,xla-ireemlxcel(lib test) does not compile--no-default-features --features xla-diagnostics--features cuda,xla-reference-diagnostics--keep-goingand--all-targetsare there so that one failing target cannot hide another: this is the only finding on any of the three.Test plan
Run on this PR's commit (
89093d179, one commit once6855bc8) on a DGX Spark (GB10).cargo fmt --all -- --checkcargo clippy --workspace --all-targets --features cuda -- -D warnings(the Linux spelling of the template's line), andcargo clippy -p mlxcel --lib --tests -- -D warningswith default features, theclippyjob a fork PR does not get: both passcargo test --profile test-fast --features cuda,xla-iree --lib server::batch::xla_worker -- --test-threads=1: 19 passed, as onmain,a_budget_wider_than_the_shape_is_clamped_instead_of_refusedamong themcargo check --features cuda,xla-iree --all-targetsandcargo check --no-default-features --features xla-diagnostics --all-targets, the twoxla-compilesteps: passscripts/insert_apache_header.py --check,scripts/ci/check_cross_repo_refs.py: OKmake verify-test-cuda: not run. The file is compiled only withxla-iree, which that gate does not enablecargo deny check: not run and not applicableNotes for reviewers
clippyruns-p mlxcel --lib --testswith default features, andxla-compilerunscargo check, which does not run clippy's lints. Swappingcargo checkforcargo clippy ... -- -D warningsin the twoxla-compilesteps would cover it; I have not touched the workflow.Checklist
docs/: no user-facing behavior or supported-model change// Used by: ...comments: no shared function is modified.envfiles committed