aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2020-11-23 20:00:16 +0100
committerAndrzej Janik <[email protected]>2020-11-23 20:01:10 +0100
commiteb7c9aeeee4cf20a4d81a319f4ebf9329efb819f (patch)
treeaf96435ca89cb36ffd414be99acdd1f91c701787 /ptx
parent0415f873ae15aceda87758f9fcce5d38aa68ca75 (diff)
downloadZLUDA-eb7c9aeeee4cf20a4d81a319f4ebf9329efb819f.tar.gz
ZLUDA-eb7c9aeeee4cf20a4d81a319f4ebf9329efb819f.zip
Rename everything
Diffstat (limited to 'ptx')
-rw-r--r--ptx/lib/zluda_ptx_impl.cl (renamed from ptx/lib/notcuda_ptx_impl.cl)6
-rw-r--r--ptx/lib/zluda_ptx_impl.spv (renamed from ptx/lib/notcuda_ptx_impl.spv)bin49600 -> 49600 bytes
-rw-r--r--ptx/src/test/spirv_run/assertfail.spvtxt2
-rw-r--r--ptx/src/test/spirv_run/atom_inc.spvtxt4
-rw-r--r--ptx/src/test/spirv_run/bfe.spvtxt2
-rw-r--r--ptx/src/test/spirv_run/mod.rs6
-rw-r--r--ptx/src/test/spirv_run/shl_link_hack.spvtxt2
-rw-r--r--ptx/src/translate.rs10
8 files changed, 16 insertions, 16 deletions
diff --git a/ptx/lib/notcuda_ptx_impl.cl b/ptx/lib/zluda_ptx_impl.cl
index c633ddc..94d02ec 100644
--- a/ptx/lib/notcuda_ptx_impl.cl
+++ b/ptx/lib/zluda_ptx_impl.cl
@@ -1,9 +1,9 @@
// Every time this file changes it must te rebuilt:
-// ocloc -file notcuda_ptx_impl.cl -64 -options "-cl-std=CL2.0 -Dcl_intel_bit_instructions" -out_dir . -device kbl -output_no_suffix -spv_only
+// ocloc -file zluda_ptx_impl.cl -64 -options "-cl-std=CL2.0 -Dcl_intel_bit_instructions" -out_dir . -device kbl -output_no_suffix -spv_only
// Additionally you should strip names:
-// spirv-opt --strip-debug notcuda_ptx_impl.spv -o notcuda_ptx_impl.spv
+// spirv-opt --strip-debug zluda_ptx_impl.spv -o zluda_ptx_impl.spv
-#define FUNC(NAME) __notcuda_ptx_impl__ ## NAME
+#define FUNC(NAME) __zluda_ptx_impl__ ## NAME
#define atomic_inc(NAME, SUCCESS, FAILURE, SCOPE, SPACE) \
uint FUNC(NAME)(SPACE uint* ptr, uint threshold) { \
diff --git a/ptx/lib/notcuda_ptx_impl.spv b/ptx/lib/zluda_ptx_impl.spv
index aa30fb8..aa30fb8 100644
--- a/ptx/lib/notcuda_ptx_impl.spv
+++ b/ptx/lib/zluda_ptx_impl.spv
Binary files differ
diff --git a/ptx/src/test/spirv_run/assertfail.spvtxt b/ptx/src/test/spirv_run/assertfail.spvtxt
index 09f9abf..33cdb7f 100644
--- a/ptx/src/test/spirv_run/assertfail.spvtxt
+++ b/ptx/src/test/spirv_run/assertfail.spvtxt
@@ -10,7 +10,7 @@
%67 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %12 "assertfail"
- OpDecorate %1 LinkageAttributes "__notcuda_ptx_impl____assertfail" Import
+ OpDecorate %1 LinkageAttributes "__zluda_ptx_impl____assertfail" Import
%void = OpTypeVoid
%ulong = OpTypeInt 64 0
%_ptr_Function_ulong = OpTypePointer Function %ulong
diff --git a/ptx/src/test/spirv_run/atom_inc.spvtxt b/ptx/src/test/spirv_run/atom_inc.spvtxt
index fda26c5..9469835 100644
--- a/ptx/src/test/spirv_run/atom_inc.spvtxt
+++ b/ptx/src/test/spirv_run/atom_inc.spvtxt
@@ -10,8 +10,8 @@
%47 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "atom_inc"
- OpDecorate %38 LinkageAttributes "__notcuda_ptx_impl__atom_relaxed_gpu_generic_inc" Import
- OpDecorate %42 LinkageAttributes "__notcuda_ptx_impl__atom_relaxed_gpu_global_inc" Import
+ OpDecorate %38 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_generic_inc" Import
+ OpDecorate %42 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_global_inc" Import
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_Generic_uint = OpTypePointer Generic %uint
diff --git a/ptx/src/test/spirv_run/bfe.spvtxt b/ptx/src/test/spirv_run/bfe.spvtxt
index edcf138..5f9edad 100644
--- a/ptx/src/test/spirv_run/bfe.spvtxt
+++ b/ptx/src/test/spirv_run/bfe.spvtxt
@@ -10,7 +10,7 @@
%40 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "bfe"
- OpDecorate %34 LinkageAttributes "__notcuda_ptx_impl__bfe_u32" Import
+ OpDecorate %34 LinkageAttributes "__zluda_ptx_impl__bfe_u32" Import
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%43 = OpTypeFunction %uint %uint %uint %uint
diff --git a/ptx/src/test/spirv_run/mod.rs b/ptx/src/test/spirv_run/mod.rs
index 3148120..86f9c16 100644
--- a/ptx/src/test/spirv_run/mod.rs
+++ b/ptx/src/test/spirv_run/mod.rs
@@ -170,9 +170,9 @@ fn test_ptx_assert<'a, T: From<u8> + ze::SafeRepr + Debug + Copy + PartialEq>(
let mut errors = Vec::new();
let ast = ptx::ModuleParser::new().parse(&mut errors, ptx_text)?;
assert!(errors.len() == 0);
- let notcuda_module = translate::to_spirv_module(ast)?;
+ let zluda_module = translate::to_spirv_module(ast)?;
let name = CString::new(name)?;
- let result = run_spirv(name.as_c_str(), notcuda_module, input, output)
+ let result = run_spirv(name.as_c_str(), zluda_module, input, output)
.map_err(|err| DisplayError { err })?;
assert_eq!(result.as_slice(), output);
Ok(())
@@ -331,7 +331,7 @@ fn test_spvtxt_assert<'a>(
} else {
Cow::Owned(spirv_module.spirv.disassemble())
};
- if let Ok(dump_path) = env::var("NOTCUDA_TEST_SPIRV_DUMP_DIR") {
+ if let Ok(dump_path) = env::var("ZLUDA_TEST_SPIRV_DUMP_DIR") {
let mut path = PathBuf::from(dump_path);
if let Ok(()) = fs::create_dir_all(&path) {
path.push(spirv_file_name);
diff --git a/ptx/src/test/spirv_run/shl_link_hack.spvtxt b/ptx/src/test/spirv_run/shl_link_hack.spvtxt
index 0114a55..8656049 100644
--- a/ptx/src/test/spirv_run/shl_link_hack.spvtxt
+++ b/ptx/src/test/spirv_run/shl_link_hack.spvtxt
@@ -10,7 +10,7 @@
%34 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "shl_link_hack"
- OpDecorate %29 LinkageAttributes "__notcuda_ptx_impl__atom_relaxed_gpu_generic_inc" Import
+ OpDecorate %29 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_generic_inc" Import
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_Generic_uint = OpTypePointer Generic %uint
diff --git a/ptx/src/translate.rs b/ptx/src/translate.rs
index 3133fdc..15211ab 100644
--- a/ptx/src/translate.rs
+++ b/ptx/src/translate.rs
@@ -9,7 +9,7 @@ use std::{
use rspirv::binary::Assemble;
-static NOTCUDA_PTX_IMPL: &'static [u8] = include_bytes!("../lib/notcuda_ptx_impl.spv");
+static ZLUDA_PTX_IMPL: &'static [u8] = include_bytes!("../lib/zluda_ptx_impl.spv");
quick_error! {
#[derive(Debug)]
@@ -506,7 +506,7 @@ pub fn to_spirv_module<'a>(ast: ast::Module<'a>) -> Result<Module, TranslateErro
spirv,
kernel_info,
should_link_ptx_impl: if must_link_ptx_impl {
- Some(NOTCUDA_PTX_IMPL)
+ Some(ZLUDA_PTX_IMPL)
} else {
None
},
@@ -1226,7 +1226,7 @@ fn translate_function<'a>(
) -> Result<Option<Function<'a>>, TranslateError> {
let import_as = match &f.func_directive {
ast::MethodDecl::Func(_, "__assertfail", _) => {
- Some("__notcuda_ptx_impl____assertfail".to_owned())
+ Some("__zluda_ptx_impl____assertfail".to_owned())
}
_ => None,
};
@@ -1667,7 +1667,7 @@ fn to_ptx_impl_atomic_call(
let scope = ptx_scope_name(details.scope);
let space = ptx_space_name(details.space);
let fn_name = format!(
- "__notcuda_ptx_impl__atom_{}_{}_{}_{}",
+ "__zluda_ptx_impl__atom_{}_{}_{}_{}",
semantics, scope, space, op
);
// TODO: extract to a function
@@ -1757,7 +1757,7 @@ fn to_ptx_impl_bfe_call(
typ: ast::IntType,
arg: ast::Arg4<ExpandedArgParams>,
) -> ExpandedStatement {
- let prefix = "__notcuda_ptx_impl__";
+ let prefix = "__zluda_ptx_impl__";
let suffix = match typ {
ast::IntType::U32 => "bfe_u32",
ast::IntType::U64 => "bfe_u64",