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

[rust] Fix NDArrayTests failure on cuda #3319

Merged
merged 2 commits into from
Jul 10, 2024
Merged

Conversation

xyang16
Copy link
Contributor

@xyang16 xyang16 commented Jul 10, 2024

Description

Brief description of what this PR is about

Fix NDArrayTests failure on cuda

  1. ai.djl.engine.rust.NDArrayTests.testExpandDim: This is candle bug. I raised an issue in candle. I will add the code back once it's fixed.
ai.djl.engine.EngineException: DriverError(CUDA_ERROR_INVALID_VALUE, "invalid argument")
	at app//ai.djl.engine.rust.RustLibrary.contentEqual(Native Method)
	at app//ai.djl.engine.rust.RsNDArray.contentEquals(RsNDArray.java:368)
	at app//ai.djl.engine.rust.RsNDArray.equals(RsNDArray.java:1615)
	at app//org.testng.Assert.areEqualImpl(Assert.java:180)
	at app//org.testng.Assert.assertEqualsImpl(Assert.java:148)
	at app//org.testng.Assert.assertEquals(Assert.java:132)
	at app//org.testng.Assert.assertEquals(Assert.java:644)
	at app//ai.djl.engine.rust.NDArrayTests.testExpandDim(NDArrayTests.java:225)

  1. ai.djl.engine.rust.NDArrayTests.testToDataType: Changed to cast int32 to float16 since cast_i64_f16 is not supported.
ai.djl.engine.EngineException: Cuda(Load { cuda: DriverError(CUDA_ERROR_NOT_FOUND, "named symbol not found"), module_name: "cast_i64_f16" })
	at app//ai.djl.engine.rust.RustLibrary.toDataType(Native Method)
	at app//ai.djl.engine.rust.RsNDArray.toType(RsNDArray.java:175)
	at app//ai.djl.engine.rust.RsNDArray.toType(RsNDArray.java:35)
	at app//ai.djl.engine.rust.NDArrayTests.testToDataType(NDArrayTests.java:110)

@xyang16 xyang16 requested review from zachgk, frankfliu and a team as code owners July 10, 2024 16:02
@xyang16 xyang16 force-pushed the rust branch 2 times, most recently from 0dd5dd8 to 3bf3339 Compare July 10, 2024 17:04
@xyang16 xyang16 merged commit 97b9a93 into deepjavalibrary:master Jul 10, 2024
5 checks passed
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