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

possible issue with protocol-based types #211

Closed
tmc opened this issue Sep 7, 2023 · 0 comments · Fixed by #213
Closed

possible issue with protocol-based types #211

tmc opened this issue Sep 7, 2023 · 0 comments · Fixed by #213
Labels
bug Something isn't working
Milestone

Comments

@tmc
Copy link
Collaborator

tmc commented Sep 7, 2023

Given a sample test (in macos/mps/metal_test.go):

func TestMPSMatrixMultiplication(t *testing.T) {
    d := metal.CreateSystemDefaultDevice()
    cq := d.NewCommandQueue()
    cb := cq.CommandBuffer()

    mm := NewMatrixMultiplication()
    mm.EncodeToCommandBufferLeftMatrixRightMatrixResultMatrix(cb, NewMatrix(), NewMatrix(), NewMatrix())
}

This fails to typecheck with:

./mps_test.go:22:60: cannot use cb (variable of type metal.CommandBufferWrapper) as metal.PCommandBuffer value in argument to mm.EncodeToCommandBufferLeftMatrixRightMatrixResultMatrix: metal.CommandBufferWrapper does not implement metal.PCommandBuffer (wrong type for method AccelerationStructureCommandEncoder)
		have AccelerationStructureCommandEncoder() metal.AccelerationStructureCommandEncoderWrapper
		want AccelerationStructureCommandEncoder() metal.PAccelerationStructureCommandEncoder
FAIL	github.com/progrium/macdriver/macos/mps [build failed]
@progrium progrium added the bug Something isn't working label Sep 8, 2023
@progrium progrium added this to the 0.5.0 milestone Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants