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

Potential bug in check_value_tag_compatibility_enter #48

Open
mjguynn opened this issue Mar 31, 2023 · 1 comment
Open

Potential bug in check_value_tag_compatibility_enter #48

mjguynn opened this issue Mar 31, 2023 · 1 comment

Comments

@mjguynn
Copy link
Contributor

mjguynn commented Mar 31, 2023

value @fmul_gpu_val(%a: f32, %b: f32) -> f32 {
    %result_t = call @fmul_gpu(%a, %b);
    %result = extract %result_t 0;
    return %result;
}
schedule @fmul_gpu_sched(%a_gpu: $gpu_f32_encoded, %b_gpu: $gpu_f32_encoded, %ab_gpu: $gpu_f32_empty) -> $gpu_f32_encoded {
    %_ = encode-do-gpu @fmul_gpu_val.%result_t(%a_gpu, %b_gpu) -> %ab_gpu;
    return %ab_gpu;
}

// ... in input slot declarations for @fmul_gpu_sched:
%ab_gpu : slot_info(value_tag output @fmul_gpu_val.%a, spatial_tag input @saxpy_spatial.%bs)

Error:
'Ill-formed: Operation { remote_node_id: RemoteNodeId { funclet_id: 10, node_id: 4 } } to Output { funclet_id: 5, index: 0 }', src\type_system\value_tag.rs:33:14

Note that funclet 5 is fmul_gpu_val and funclet 10 is the value function implemented by the scheduling funclet which is calling @fmul_gpu_sched. (Also, @fmul_gpu_val.%a refers to the first output of @fmul_gpu_val.)

@mjguynn
Copy link
Contributor Author

mjguynn commented Mar 31, 2023

I tried adding a case to value_tag to accept this, but that causes a different failure:
ir::ValueTag::Output{funclet_id, index} => panic!("{:?} can only appear in interface of funclet", value_tag),

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

No branches or pull requests

1 participant