Skip to content

Commit

Permalink
Support Meshroom (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
vosen committed May 16, 2024
1 parent fcd7a57 commit 2d8c47f
Show file tree
Hide file tree
Showing 27 changed files with 1,486 additions and 275 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ If an application fails to start under ZLUDA or crashes please check [Known Issu

### Applications

#### Meshroom

Meshroom works only with on Windows due to an underlying ROCm/HIP issue.

Meshroom 2023.3.0 might not work, it's recommended to use Meshroom freshly built from develop branch. See #79 and alicevision/Meshroom#595. Please open an issue here if you run into problems.


#### llama.cpp

If you are building llama.cpp with cmake and don't want it to crash on ZLUDA then you should use `CUDA_DOCKER_ARCH=compute_61` like this:
Expand Down
Binary file modified ptx/lib/zluda_ptx_impl.bc
Binary file not shown.
190 changes: 115 additions & 75 deletions ptx/lib/zluda_ptx_impl.cpp

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions ptx/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ pub enum Instruction<P: ArgParams> {
Membar {
level: MemScope,
},
Tex(TexDetails, Arg4Tex<P>),
Suld(SurfaceDetails, Arg4Tex<P>),
Tex(TexDetails, Arg5Tex<P>),
Suld(SurfaceDetails, Arg5Tex<P>),
Sust(SurfaceDetails, Arg4Sust<P>),
Shfl(ShflMode, Arg5Shfl<P>),
Shf(FunnelShift, Arg4<P>),
Expand All @@ -476,6 +476,7 @@ pub enum Instruction<P: ArgParams> {
MatchAny(Arg3<P>),
Red(AtomDetails, Arg2St<P>),
Nanosleep(Arg1<P>),
Isspacep(StateSpace, Arg2<P>),
Sad(ScalarType, Arg4<P>),
}

Expand Down Expand Up @@ -617,13 +618,6 @@ pub struct Arg4Setp<P: ArgParams> {
pub src2: P::Operand,
}

pub struct Arg4Tex<P: ArgParams> {
pub dst: P::Operand,
pub image: P::Operand,
pub layer: Option<P::Operand>,
pub coordinates: P::Operand,
}

pub struct Arg4Sust<P: ArgParams> {
pub image: P::Operand,
pub coordinates: P::Operand,
Expand All @@ -639,6 +633,14 @@ pub struct Arg5<P: ArgParams> {
pub src4: P::Operand,
}

pub struct Arg5Tex<P: ArgParams> {
pub dst: P::Operand,
pub image: P::Operand,
pub layer: Option<P::Operand>,
pub coordinates: P::Operand,
pub lod: Option<P::Operand>,
}

pub struct Arg5Setp<P: ArgParams> {
pub dst1: P::Id,
pub dst2: Option<P::Id>,
Expand Down Expand Up @@ -1317,6 +1319,7 @@ pub enum TuningDirective {
MaxNtid(u32, u32, u32),
ReqNtid(u32, u32, u32),
MinNCtaPerSm(u32),
Noreturn,
}

#[repr(u8)]
Expand Down Expand Up @@ -1382,8 +1385,8 @@ pub enum TextureGeometry {
#[derive(Clone)]
pub enum Initializer<ID> {
Constant(ImmediateValue),
Global(ID, Type),
GenericGlobal(ID, Type),
Global(ID),
GenericGlobal(ID),
Add(Box<(Initializer<ID>, Initializer<ID>)>),
Array(Vec<Initializer<ID>>),
}
Expand Down
Loading

0 comments on commit 2d8c47f

Please sign in to comment.