Skip to content

Commit

Permalink
Merge branch 'dev-fallback-backend' of https://github.com/LuisaGroup/…
Browse files Browse the repository at this point in the history
…LuisaCompute into dev-fallback-backend
  • Loading branch information
Mike-Leo-Smith committed Dec 26, 2024
2 parents 4c90d37 + 1d408e4 commit 14be1fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/backends/cuda/cuda_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ template<bool allow_update_expected_metadata>
return ptx_data;
}

ShaderCreationInfo CUDADevice::_create_shader(luisa::string name,
const string &source, const ShaderOption &option,
luisa::span<const char *const> nvrtc_options,
const CUDAShaderMetadata &expected_metadata,
luisa::vector<ShaderDispatchCommand::Argument> bound_arguments) noexcept {
ShaderCreationInfo CUDADevice::_load_or_compile_shader(luisa::string name,
const string &source, const ShaderOption &option,
luisa::span<const char *const> nvrtc_options,
const CUDAShaderMetadata &expected_metadata,
luisa::vector<ShaderDispatchCommand::Argument> bound_arguments) noexcept {

// generate a default name if not specified
auto uses_user_path = !name.empty();
Expand Down Expand Up @@ -786,9 +786,9 @@ ShaderCreationInfo CUDADevice::create_shader(const ShaderOption &option, Functio
}
return t; }(),
};
return _create_shader(option.name, scratch.string(),
option, nvrtc_options,
metadata, std::move(bound_arguments));
return _load_or_compile_shader(option.name, scratch.string(),
option, nvrtc_options,
metadata, std::move(bound_arguments));
}

ShaderCreationInfo CUDADevice::create_shader(const ShaderOption &option, const ir::KernelModule *kernel) noexcept {
Expand Down
2 changes: 1 addition & 1 deletion src/backends/cuda/cuda_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class CUDADevice final : public DeviceInterface {
#endif

private:
[[nodiscard]] ShaderCreationInfo _create_shader(luisa::string name,
[[nodiscard]] ShaderCreationInfo _load_or_compile_shader(luisa::string name,
const string &source, const ShaderOption &option,
luisa::span<const char *const> nvrtc_options,
const CUDAShaderMetadata &expected_metadata,
Expand Down

0 comments on commit 14be1fd

Please sign in to comment.