Code Monkey home page Code Monkey logo

Comments (7)

a2flo avatar a2flo commented on June 13, 2024

Hi, what exactly are you trying to do? Which OS/version are you using? What is your kernel code?

from floor.

hanjin666 avatar hanjin666 commented on June 13, 2024

macOSX 10.13.6,kernel code very simple,like kernel void helloWorld(){} , kernel has be compiled to a metallib file . in our projection, llvm and clang linked be a third-party library,not as command line tools.
NSError *err = nullptr;
id<MTLComputePipelineState> kernel_state = nil;
if ([func functionType] == MTLFunctionTypeKernel) {
auto dev = [prog.second.program device];
kernel_state = [dev newComputePipelineStateWithFunction:func error:&err];
if (!kernel_state) {
log_error(
"failed to create kernel state \"%s\" for device \"%s\": %s",
info.name, prog.first->name,
(err != nullptr ? [[err localizedDescription] UTF8String]
: "unknown error"));
continue;
}
}
failed to create kernel state.

from floor.

a2flo avatar a2flo commented on June 13, 2024

Can you upload the metallib file? Also, which GPU?
This error usually occurs when the compiler service / backend compiler crashes.

from floor.

hanjin666 avatar hanjin666 commented on June 13, 2024

temp_file_or_code.metallib.zip
hi,thx for your response .graphic card is gtx750ti.

kernel's source code
#include <common.hh>
#include <flywave/math/color.hh>

void test1(global flywave::color4<float> *cay, global int *size) {
int gid = get_group_id(0);
int glbid = get_global_id(0);
int lid = get_local_id(0);

int gsize = get_group_size(0);
int gblsize = get_global_size(0);
int lsize = get_local_size(0);

int index = glbid + lid;
barrier();

if (index >= *size)
return;

auto &d = cay[index];
auto aver = (d.r * 0.3 + d.g * 0.59 + d.b * 0.11);
d.r = aver;
d.g = aver;
d.b = aver;
}

kernel void helloWorld(global int *size) {
#if !defined(FLYWAVE_COMPUTE_METAL)
printf("hello world! %d \n", *size);
#endif
}

kernel void helloWorld1(global flywave::color4<float> *data, global int *size) {
test1(data, size);
}

from floor.

a2flo avatar a2flo commented on June 13, 2024

Hm, probably shouldn't use doubles.
Other than that, there might be other Nvidia backend compiler issues on 10.13.

from floor.

hanjin666 avatar hanjin666 commented on June 13, 2024

thanks,I got it.cuda do not work on this computer .once invoke cuda's api,then application will be crashed.there might be a Nvidia webdriver's bug.

from floor.

a2flo avatar a2flo commented on June 13, 2024
  • closing this, since it's outdated

from floor.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.