Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion contrib/Orochi/Orochi/Orochi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,9 @@ oroDevice oroGetRawDevice( oroDevice dev )

oroDevice oroSetRawDevice( oroApi api, oroDevice dev )
{
ioroDevice d( dev );
ioroDevice d{};
d.setApi( api );
d.setDevice( dev );
return *(oroDevice*)&d;
Comment thread
meistdan marked this conversation as resolved.
}

Expand Down
3 changes: 2 additions & 1 deletion hiprt/impl/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ HIPRT_STATIC_ASSERT( !UseBakedCode || BakedCodeIsGenerated );

namespace hiprt
{
Compiler::Compiler()

void Compiler::init()
{
if ( UseBitcode || UseBakedCompiledKernel || hiprtcCreateProgram == nullptr || hiprtcCompileProgram == nullptr ||
hiprtcDestroyProgram == nullptr )
Comment thread
meistdan marked this conversation as resolved.
Expand Down
3 changes: 2 additions & 1 deletion hiprt/impl/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ class Context;
class Compiler
{
public:
Compiler();
~Compiler();

void init();

Kernel getKernel(
Context& context,
const std::filesystem::path& moduleName,
Expand Down
2 changes: 2 additions & 0 deletions hiprt/impl/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Context::Context( const hiprtContextCreationInput& input )
oroApi api = ( input.deviceType == hiprtDeviceAMD ) ? ORO_API_HIP : ORO_API_CUDA;
oroCtxCreateFromRaw( &m_ctxt, api, input.ctxt );
m_device = oroSetRawDevice( api, input.device );
checkOro( oroCtxSetCurrent( m_ctxt ) );
m_compiler.init();
Comment thread
meistdan marked this conversation as resolved.
Comment thread
meistdan marked this conversation as resolved.
}

Context::~Context()
Expand Down