OpenCL ptxas错误

时间:2016-02-17 17:13:33

标签: opencv opengl opencl

我正在推出一个使用openCV / Opengl的程序,它曾经工作正常,没有任何错误。现在,当它开始时,我得到了这个:

class TestSimpleValidation(ManagerTestBase):
"""Tests for validation errors raised by the SQLAlchemy's simple built-in
validation.
For more information about this functionality, see the documentation for
:func:`sqlalchemy.orm.validates`.
"""

def setup(self):
    """Create APIs for the validated models."""
    super(TestSimpleValidation, self).setup()

    class Person(self.Base):
        __tablename__ = 'person'
        id = Column(Integer, primary_key=True)
        age = Column(Integer, nullable=False)

        @validates('age')
        def validate_age(self, key, number):
            if not 0 <= number <= 150:
                exception = CoolValidationError()
                exception.errors = dict(age='Must be between 0 and 150')
                raise exception
            return number

        @validates('articles')
        def validate_articles(self, key, article):
            if article.title is not None and len(article.title) == 0:
                exception = CoolValidationError()
                exception.errors = {'articles': 'empty title not allowed'}
                raise exception
            return article

    class Article(self.Base):
        __tablename__ = 'article'
        id = Column(Integer, primary_key=True)
        title = Column(Unicode)
        author_id = Column(Integer, ForeignKey('person.id'))
        author = relationship('Person', backref=backref('articles'))

    self.Article = Article
    self.Person = Person
    self.Base.metadata.create_all()
    self.manager.create_api(Article)
    self.manager.create_api(Person, methods=['POST', 'PATCH'],
                            validation_exceptions=[CoolValidationError])

(Mac Os X 10.11)

然后我的程序继续正常运行。我不知道是什么原因造成的,如果这与我的代码相关或不相关,我也不知道在哪里看。过去一样的代码都没问题。它与我使用的openGL包装器库有关吗?这有多严重?有人可以向我解释这个错误吗?

修改

我设法识别导致此错误的代码:

data = dict(data=dict(type='person', age=-1))
response = self.app.post('/api/person', data=dumps(data))

这实际上是对HTTP/1.1 400 Bad Request { "validation_errors": { "age": "Must be between 0 and 150", } } OpenCL program build log: -D LOCAL_SIZE_X=8 -D LOCAL_SIZE_Y=8 -D SPLIT_STAGE=1 -D N_STAGES=20 -D MAX_FACES=10000 -D LBP ptxas application ptx input, line 637; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher ptxas application ptx input, line 884; error : Instruction '{atom,red}.shared' requires .target sm_12 or higher ptxas fatal : Ptx assembly aborted due to errors 一个 face_cascade.detectMultiScale(frame_gray, faces, 1.1, 2, 0, cv::Size(80, 80)); cv::CascadeClassifier::detectMultiScale作为参数的调用。

0 个答案:

没有答案