mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-09-26 11:19:06 +00:00
Remove debugging hack
This commit is contained in:
parent
147b792cc3
commit
28b464b816
2 changed files with 1 additions and 34 deletions
|
@ -1,30 +0,0 @@
|
|||
pub(crate) fn run<'input>(
|
||||
directives: Vec<ptx_parser::Directive<'input, ptx_parser::ParsedOperand<&'input str>>>,
|
||||
) -> Vec<ptx_parser::Directive<'input, ptx_parser::ParsedOperand<&'input str>>> {
|
||||
let demo_kernels_path = std::env::var("ZLUDA_DEMO_KERNELS").unwrap();
|
||||
let demo_kernels_file = std::fs::read_to_string(demo_kernels_path).unwrap();
|
||||
let demo_kernels = demo_kernels_file
|
||||
.lines()
|
||||
.map(|line| line.trim())
|
||||
.filter(|line| !line.is_empty())
|
||||
.collect::<std::collections::HashSet<_>>();
|
||||
let result = directives
|
||||
.into_iter()
|
||||
.filter(|directive| match directive {
|
||||
ptx_parser::Directive::Method(_, method) => {
|
||||
!method.func_directive.name.is_kernel()
|
||||
|| demo_kernels.contains(method.func_directive.name())
|
||||
}
|
||||
_ => true,
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
for directive in result.iter() {
|
||||
match directive {
|
||||
ptx_parser::Directive::Method(_, method) => {
|
||||
eprintln!("{}", method.func_directive.name());
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
|
@ -13,7 +13,6 @@ use strum_macros::EnumIter;
|
|||
|
||||
mod deparamize_functions;
|
||||
mod expand_operands;
|
||||
mod filter_for_demo;
|
||||
mod fix_special_registers;
|
||||
mod hoist_globals;
|
||||
mod insert_explicit_load_store;
|
||||
|
@ -66,9 +65,7 @@ pub fn to_llvm_module<'input>(
|
|||
let mut flat_resolver = GlobalStringIdentResolver2::<'input>::new(SpirvWord(1));
|
||||
let mut scoped_resolver = ScopedResolver::new(&mut flat_resolver);
|
||||
let sreg_map = SpecialRegistersMap::new(&mut scoped_resolver)?;
|
||||
let directives = filter_for_demo::run(ast.directives);
|
||||
on_pass_end("filter_for_demo");
|
||||
let directives = normalize_identifiers2::run(&mut scoped_resolver, directives)?;
|
||||
let directives = normalize_identifiers2::run(&mut scoped_resolver, ast.directives)?;
|
||||
on_pass_end("normalize_identifiers2");
|
||||
let directives = replace_known_functions::run(&mut flat_resolver, directives);
|
||||
on_pass_end("replace_known_functions");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue